# Tag Archives: Amazon-Question

## Check if two trees are MirrorMay 23, 2016

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 »

## Find a triplet that sum to a given valueMay 22, 2012

Given an array and a value, find if there is a triplet in array whose sum is equal to the given value. If there is… Read More »

## Print a given matrix in spiral formAugust 20, 2011

Given a 2D array, print it in spiral form. See the following examples.

## Reverse a Linked List in groups of given size | Set 1June 14, 2010

Given a linked list, write a function to reverse every k nodes (where k is an input to the function).

## Write an Efficient Function to Convert a Binary Tree into its Mirror TreeJune 27, 2009

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.

## Largest Sum Contiguous SubarrayJune 22, 2009

Write an efficient C program to find the sum of contiguous subarray within a one-dimensional array of numbers which has the largest sum.

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

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