Skip to content
the poor coder

Home / Topics / #stl

#STL

7 posts
2020

Hackerrank Deque-STL Solution

Double ended queue or Deque(part of C++ STL) are sequence containers with dynamic sizes that can be expanded or contracted on both ends (either its front or its back). The member functions of deque that are mainly used…

2020

Hackerrank Print Pretty Solution

Your manager gave you a text file with many lines of numbers to format and print. For each row of space-separated doubles, format and print the numbers using the specifications in the Output Format section below. Input…

2020

Hackerrank Maps-STL Solution

Maps are a part of the C++ STL.Maps are associative containers that store elements formed by a combination of a key value and a mapped value, following a specific order.The mainly used member functions of maps are: Map…

2020

Hackerrank Sets-STL Solution

Sets are a part of the C++ STL. Sets are containers that store unique elements following a specific order. Here are some of the frequently used member functions of sets: Declaration: Size: Insert: Erasing an element…

2020

Hackerrank Lower Bound-STL Solution

You are given integers in sorted order. Also, you are given queries. In each query, you will be given an integer and you have to tell whether that integer is present in the array. If so, you have to tell at which index…

2020

Hackerrank Vector-Erase Solution

You are provided with a vector of integers. Then, you are given queries. For the first query, you are provided with integer, which denotes a position in the vector. The value at this position in the vector needs to be…

2020

Hackerrank Vector-Sort Solution

You are given integers.Sort the integers and print the sorted order. Store the integers in a vector.Vectors are sequence containers representing arrays that can change in size. Declaration: Size: Pushing an integer into…

ESC