Sort And Searching Question:

Download Job Interview Questions and Answers PDF

How to sort 1 million floating point numbers?

Sort And Searching Interview Question
Sort And Searching Interview Question

Answer:

Radix Sort.. easily can be done.. user bitwise operations to bucket the numbers.. same algorithm can be used for negative and positive mix of fp numbers with some minor modification to the initial list

Download Sort And Searching Interview Questions And Answers PDF

Previous QuestionNext Question
What is Binary Search Tree and explain its time complexity?Explain which of the following is true about asort?
• Sorts highest to lowest by value maintaining key association.
• Sorts lowest to highest by key maintaining key association.
• Sorts highest to lowest by key, re-indexing the array.
• Sorts lowest to highest by value, re-indexing the array.