Given an linked list of integers, rearrange it such that every second node of the linked list is greater than its left and right nodes. In other words, rearrange linked list node in alternating high-low.
Given an NxN matrix, check if it is Toeplitz matrix or not. A Toeplitz matrix or diagonal-constant matrix is a matrix in which each descending diagonal from left to right is constant.
Given a normal binary tree, convert it to Left-child right-sibling (LC-RS) binary tree.
Given an unsorted array of integers, find a triplet with given sum in it.
Implement your own diff utility. i.e given two similar strings, efficiently list out all differences between them.
Given a number, check if it is power of four or not.
Given M sorted lists of variable length, print them in sorted order efficiently.
Given a string, calculate its rank among all its lexicographically sorted permutations. For example, consider below lexicographically sorted permutations
Given a linked list containing 0’s, 1’s and 2’s, sort linked list by doing single traversal of it.
Given a number, check if it is power of 8 or not.
Given two Boolean arrays X and Y, find the length of longest continuous sequence that starts and ends at same index in both arrays and have same sum. In other words, find max(j-i+1) for every j >= i where sum of sub-array X[i, j] is equal to sum of sub-array Y[i, j].
Implement Quicksort efficiently for inputs containing many repeated elements.