Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?
Answer / Ankur Singh Yadav
Binary Search (not a sorting algorithm) has a divide-and-conquer approach and operates on sorted arrays, making recursive calls to compare keys and divide the search space in half until finding the target. Merge Sort and QuickSort are common recursive sorting algorithms that make recursive calls to sort subarrays approximately halved in size.
| Is This Answer Correct ? | 0 Yes | 0 No |
How do you print for example the integers 3,2,1,5,4 in a binary tree within the console in format where it looks like an actual binary tree?
make a middle node of doubly linklist to the top of the list
Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == 4 ) y-= 7; else y = 8; Enter a segment of code (without any IF statements) that does exectly the same thing using the switch structure.
Difference between inline functions and macros?
Which is most difficult programming language?
What does extern mean in a function declaration in c++?
What is a pdb file?
What are special characters c++?
How to create a pure virtual function?
Does c++ cost money?
What is polymorphism in c++? Explain with an example?
Write a program in c++ to print the numbers from n to n2 except 5 and its multiples