## Check if it is possible to reach a number by making jumps of two given length

Given a starting position ‘k’ and two jump sizes ‘d1’ and ‘d2’, our task is to find the minimum number of jumps needed to reach… Read More »

## Sum of all odd nodes in the path connecting two given nodes

Given a binary tree and two nodes of that binary tree. Find the sum of all nodes with odd values in the path connecting the… Read More »

## Amazon On-Campus – 6 months Internship (SDE)

Round 1: Coding round + MCQs There were 2 coding questions and 20 mcqs of variable marks such as 4, 6 and 2 and no… Read More »

## Find i’th index character in a binary string obtained after n iterations | Set 2

Given a decimal number m, convert it into a binary string and apply n iterations, in each iteration 0 becomes “01” and 1 becomes “10”.… Read More »

## Check if two trees are Mirror

Given two Binary Trees, write a function that returns true if two trees are mirror of each other, else false. For example, the function should… Read More »

## Print a given matrix in spiral form

Given a 2D array, print it in spiral form. See the following examples. Examples: Input: 1 2 3 4 5 6 7 8 9 10… Read More »

## Reverse a Linked List in groups of given size | Set 1

Given a linked list, write a function to reverse every k nodes (where k is an input to the function). Example: Inputs: 1->2->3->4->5->6->7->8->NULL and k… Read More »

## Convert a Binary Tree into its Mirror Tree

Mirror of a Tree: Mirror of a Binary Tree T is another Binary Tree M(T) with left and right children of all non-leaf nodes interchanged.… Read More »

## Largest Sum Contiguous Subarray

Write an efficient program to find the sum of contiguous subarray within a one-dimensional array of numbers which has the largest sum. Recommended: Please solve… Read More »

## Given an array A[] and a number x, check for pair in A[] with sum as x

Write a program that, given an array A[] of n numbers and another number x, determines whether or not there exist two elements in S… Read More »