Given an array A[] consisting 0s, 1s and 2s. The task is to write a function that sorts the given array. The functions should put… Read More
Tag Archives: Amazon
The cost of a stock on each day is given in an array, find the max profit that you can make by buying and selling… Read More
The cost of a stock on each day is given in an array, find the max profit that you can make by buying and selling… Read More
Given a matrix, clockwise rotate elements in it. Examples: Input 1 2 3 4 5 6 7 8 9 Output: 4 1 2 7 5… Read More
Given a matrix, clockwise rotate elements in it. Examples: Input 1 2 3 4 5 6 7 8 9 Output: 4 1 2 7 5… Read More
Given a matrix, clockwise rotate elements in it. Examples: Input 1 2 3 4 5 6 7 8 9 Output: 4 1 2 7 5… Read More
Given a matrix, clockwise rotate elements in it. Examples: Input 1 2 3 4 5 6 7 8 9 Output: 4 1 2 7 5… Read More
Given a linked list where every node represents a linked list and contains two pointers of its type: Pointer to next node in the main… Read More
Given a linked list where every node represents a linked list and contains two pointers of its type: Pointer to next node in the main… Read More
Given a linked list where every node represents a linked list and contains two pointers of its type: Pointer to next node in the main… Read More
Given a linked list where every node represents a linked list and contains two pointers of its type: Pointer to next node in the main… Read More
Given string str, the task is to find the minimum number of characters to be inserted to convert it to a palindrome. Before we go… Read More
Given string str, the task is to find the minimum number of characters to be inserted to convert it to a palindrome. Before we go… Read More
Given string str, the task is to find the minimum number of characters to be inserted to convert it to a palindrome. Before we go… Read More
Given a singly linked list, Your task is to remove every K-th node of the linked list. Assume that K is always less than or… Read More