Skip to content

Tag Archives: Walmart

  Given a binary tree, a target node in the binary tree, and an integer value k, print all the nodes that are at distance… Read More
Given a binary tree, print it vertically. The following example illustrates vertical order traversal.   1 / \ 2 3 / \ / \ 4 5… Read More
The problem is to count all the possible paths from top left to bottom right of a mXn matrix with the constraints that from each… Read More
Given an input string and a dictionary of words, find out if the input string can be segmented into a space-separated sequence of dictionary words.… Read More
Meet Prasoon, he was just your average guy who studied at IIIT-Hyderabad but today Prasoon Mishra is one of the most well know names across… Read More
In computer science and mathematics, the Josephus Problem (or Josephus permutation) is a theoretical problem. Following is the problem statement: There are n people standing… Read More
Given two Linked Lists, create union and intersection lists that contain union and intersection of the elements present in the given lists. The order of… Read More
  Given an array of integers where each element represents the max number of steps that can be made forward from that element. Write a… Read More
Given an array of integers which is initially increasing and then decreasing, find the maximum value in the array. Examples :   Input: arr[] = {8, 10,… Read More
Write a function detectAndRemoveLoop() that checks whether a given Linked List contains loop and if loop is present then removes the loop and returns true.… Read More
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
  Given an expression string exp, write a program to examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” are… Read More
A tree where no leaf is much farther away from the root than any other leaf. Different balancing schemes allow different definitions of “much farther”… Read More
The problem is opposite of this post. We are given a stack data structure with push and pop operations, the task is to implement a… Read More