## Print All The Full Nodes in a Binary Tree

Objective: Given a binary tree, print all nodes will are full nodes. Full Nodes: Nodes Which has both the children, left and right are called Full Nodes Approach: quite simple Solution. Do the any...

Skip to content# Category: Amazon Questions

## Print All The Full Nodes in a Binary Tree

## Magic Index – Find Index In Sorted Array Such That A[i] = i.

## Find numbers which are palindrome in both their decimal and octal Representations

## Find All the Well Ordered Permutations of a Given String.

## Find Increasing Triplet Sub-sequence

## Print All the Subsets of a Given Set (Power Set)

## Clock Angle Problem

## Print All Combinations of subset of size K from Given Array

## Track the Maximum Element in a Stack.

## Print All Possible Valid Combinations Of Parenthesis of Given ‘N’

## Implement Queue Using Stacks

## Alternate Splitting of a given Linked List

## Reverse The Doubly Linked List

## Swap Kth Node from the front with the Kth Node from the End

## Print the Bottom View of the Binary Tree.

@tutorialhorizon

Objective: Given a binary tree, print all nodes will are full nodes. Full Nodes: Nodes Which has both the children, left and right are called Full Nodes Approach: quite simple Solution. Do the any...

Objective: Given a sorted array of distinct integers, Find the Magic index or Fixed point in the array. Magic Index or Fixed Point: Magic index or a Fixed point in an array is an...

Objective: Given a range of integers, find all the numbers which are palindrome when they are represented in Decimal Value( base 10) and in Octal value(base 8). Example : Number : 373 (Decimal) and...

Objective: Write an algorithm to Print All the Well Ordered Permutations of a Given String. What is Well Ordered String: When all the alphabets in a string occur in the increasing order irrespective of...

Objective: Given an integer array A[1..n], find an instance of i,j,k where 0 < i < j < k <= n and A[i] < A[j] < A[k]. Example : int arrA[] = { 10,...

Objective: Given a set of numbers, print all the posssible subsets of it including empty set. Power Set: In mathematics, PowerSet of any given set S, PS(S) is set of all subsets of S...

Objective: Find the Angle between hour hand and minute hand at the given time. Example: Time : 12:45 Input : hour = 12, Minute = 45 Output : 112.5 Time : 3:30 Input :...

Objective: Given an array of integers of size N, print all the subsets of size k. (k<=N) Example: Generate all subsets of a fixed size k of a given set [1,2,3…n]. e.g, if n=5...

Objective: In a Stack, keep track of maximum value in it. It might be the top element in the stack but once it is poped out, the maximum value should be from the rest...

ObjecÂtive: – Given “n”, generate all valid parenthesis strings of length “2n”. Example: Given n=2 Output: (()) ()() Approach:

Objective: We know that Queue is FIFO (First-in-First-Out) and Stack is LIFO ( Last-in-First-Out). Here our objective is to implement queue using stacks. Approach: Take 2 Stacks, stack1 and stack2. stack1 will be used...

Objective: Given a singly linked list, split it into two linked lists. These linked lists will contain the alternate nodes from the given linked list. Example:

Objective: Reverse The Doubly Linked List. Example: Approach: Every Node in a doubly linked list has next and previous pointer. Do the linear traversal of the linked list and keep swapping the next and...

Objective: Given a Linked List and a number k, Swap Kth Node from the front with the Kth Node from the End Example: ->10->20->30->40->50->60->70 Swapping 1 Node from the Front and from the End...

ObjecÂtive: – Given a binary tree, print it in Bottom View of it. What is Bottom View: Bottom view means when you look the tree from the bottom the nodes you will see will be...

%d bloggers like this: