Prerequisite: Merge Sort for Linked Lists Merge sort is often preferred for sorting a linked list. The slow random-access performance of a linked list makes some other algorithms (such as quicksort) perform poorly, and others (such as heapsort) completely impossible....
In this article, we will understand the basic details which are associated with the understanding part as well as the implementation part of Recursion in JavaScript....
I was called to Noida office of Adobe situated in sector 132 Noida....
Given an array arr[], the task is to find the number of rotations required to convert the given array to sorted form.Examples:...
Given a positive integer N, the task is to find the number of all N-digit numbers whose adjacent digits have equal Greatest Common Divisor(GCD)....
Given a numeric string N and an integer K, the task is to split digits of N into subparts such that the number of segments divisible by K is maximized.Note: We can make any number of vertical cuts between pairs of adjacent digits....
To propose an image encryption system using one dimensional cellular automata for image encryption and decryption. Cellular automata can be corresponded with the essential cryptographic properties i.e. Balance, correlation-immune, nonlinearity, easy to implement in hardware. CA cryptosystems can give better performances compared to classic methods that are based on computational techniques. Therefore, this technique should be most favourable for cryptography....
There are many ways of classifying algorithms and a few of them are shown below:...
Given a set of strings S and a string patt the task is to autocomplete the string patt to strings from S that have patt as a prefix, using a Ternary Search Tree. If no string matches the given prefix, print “None”.Examples:...
Check if a given number N is a perfect square or not. If yes then return the number of which it is a perfect square, Else print -1....
Given an unsorted array arr[] and an integer K, the task is to count the occurrences of K in the given array using the Divide and Conquer method....
Given an in-order traversal of a cartesian tree, the task is to build the entire tree from it....