Grover’s algorithm is an efficient algorithm for sorting, with big Ooh equals to square-root of ‘n’ (O(sqrt n)), where ‘n’ is number of entities in the list that is being to be sorted.
It is a MATLAB code. I have written this for the sorting of the numbers, that can be expressed in 3 bits when converted into binary representation. You can modify this code for higher number of bits using same methodology or using recursive function approach. There can be infinite long list of numbers in unsorted array(input).
Provide an array in first line of main.m file.