Skip to content

Tag Archives: Visa

  Given a boolean 2D matrix, find the number of islands. A group of connected 1s forms an island. For example, the below matrix contains… Read More
Given a string, find the longest substring which is palindrome.  For example, Become a success story instead of just reading about them. Prepare for coding interviews… Read More
Given a linked list where every node represents a linked list and contains two pointers of its type: (i) Pointer to next node in the main… Read More
Given an unsorted array and a number n, find if there exists a pair of elements in the array whose difference is n. Examples:   Input: arr[]… Read More
Given an unsorted array of nonnegative integers, find a continuous subarray which adds to a given number. Examples :  Input: arr[] = {1, 4, 20, 3,… Read More
  Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and… Read More
Given weights and values of n items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack.… Read More
We have discussed Knight’s tour and Rat in a Maze problems in Set 1 and Set 2 respectively. Let us discuss N Queen as another… Read More
We have discussed Backtracking and Knight’s tour problem in Set 1. Let us discuss Rat in a Maze as another example problem that can be… Read More
Write a function that takes a list sorted in non-decreasing order and deletes any duplicate nodes from the list. The list should only be traversed… Read More
  There are two singly linked lists in a system. By some programming error, the end node of one of the linked list got linked… Read More
You are given a list of n-1 integers and these integers are in the range of 1 to n. There are no duplicates in the… Read More
Given a pointer to a node to be deleted, delete the node. Note that we don’t have a pointer to the head node. Recommended: Please… Read More

Start Your Coding Journey Now!