Problem in bucket sort?

problem in bucket sort ?
how can we push multiple elements at the same index.

@mehulbhandari358 hey you have to vector at all index of map ,means each index will point to separate vector and we cam store multiple items at one index itself.

do you mean vector < vector < int>> v ??

@mehulbhandari358 hey ,like this:
map<vector, key> map_of_vector;

and what is map here…i think till now it’s not introduced too me
…can i use the vector vector (2d vector)

@mehulbhandari358 yes you can use 2d vector here also ,each row indicates 1 element with columns as its element.

but what is used in this the video , he din’t used vector vector
but he simply used vector

@mehulbhandari358 hey in video sir take vector of pointers where each pointer points to another vector,dont think about container use ,just use acc to your convenience of you and requirement of qstn,the method which sir told is one method,there may be other.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.