Write iterative version of recursive Quick Sort algorithm.
Given an array of integers, sort it using quick sort algorithm. Quicksort is an efficient in-place sorting algorithm and can be about two or three times faster than its main competitors, merge sort and heapsort when implemented well.
Given an array of integers, sort it using merge sort algorithm. Merge sort is an efficient sorting algorithm which produces a stable sort, which means that the implementation preserves the input order of equal elements in the sorted output.
Given an array of integers, sort it using bubble sort algorithm. Bubble sort is a stable, in-place sorting algorithm that is named for the way smaller or larger elements “bubble” to the top of the list. Although the algorithm is simple, it is too slow and impractical for most problems even when compared …
Given an array of integers, sort it using selection sort algorithm. Selection sort is a unstable, in-place sorting algorithm known for its simplicity, and it has performance advantages over more complicated algorithms in certain situations, particularly where auxiliary memory is limited. It can be implemented as a stable sort.
Given an array of integers, sort it using insertion sort algorithm. Insertion sort is stable, in-place sorting algorithm that builds the final sorted array one item at a time. It is not very best in terms of performance but it is more efficient in practice than most other simple O(n2) algorithms such as …
Find the total number of unique paths which the robot can take in a given maze to reach the destination from given source.
Given a N x N matrix of positive integers, find a path from the first cell of the matrix to its last cell.
Given a rectangular path in the form of binary matrix, find the length of longest possible route from source to destination position of the matrix by moving to only non-zero adjacent positions i.e. route can be formed from positions having their value as 1. Note there should not be any cycles in the output path.