When will you sort an array of pointers to list elements,
rather than sorting the elements themselves?
Answers were Sorted based on User's Feedback
Answer / pavan
If the Data structures that we are sorting are big and
located at different places then I prefer sorting pointers
rather than data itself
Is This Answer Correct ? | 39 Yes | 4 No |
Answer / kumar gaurav
if the data structure is too large,and the pointers refer to
many data then if we sort pointers then,we can easily know
where to start at,it will be very beneficial,and sorting the
elements will take a much longer time,so sorting off
elements is not beneficial
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / basav (shiv shankar)
It can be used when we store data elements at the bottom.
i.e., while storing data/records at the leaf level. Here we
generally store pointers in nodes in sorted order to make
sure the linear order of records.
Example, B+ trees.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / yenealem
using pointers makes easier data manipulation on data
structuring. Therefore, when one uses array of pointers in
sorting data makes data structuring easier.Furthermore,
When pointers are arranged in array they are easier for
arithmetic operation.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / prasad
when you are using linked lists for
storing the elements.
Is This Answer Correct ? | 6 Yes | 16 No |
Why is null not allowed in concurrenthashmap?
Why do we need a data structure?
If you are given a choice to use either arraylist and linkedlist, which one would you use and why?
List out a few of the applications that make use of Multilinked Structures?
What is the difference between hashmap and treemap?
What is a undirected graph?
How does quicksort partition work?
Mention one advantage and disadvantage of using quadratic probing?
What is garbage collection in data structure?
What does stack top do?
an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like. [ I ended up giving about 4 or 5 different solutions for this, each supposedly better than the others ].
Is hashset synchronized?