## Print the Bottom View of the Binary Tree.

Objective: – 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...

@tutorialhorizon

Objective: – 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...

Objective: Given a Linked List, Sort it using merge sort. Example: ->9->3->4->2->5->1 Sorted List: ->1->2->3->4->5->9 Approach: Reference : Merge Sort in array As it Merge sort, we apply the same logic , Divide and...

Objective: Given two linked lists, merge one list into another at alternate positions, if second link list has extra nodes, print them as well Example: 5 -> 10 -> 15 -> 20 ->25 ->...

Objective: – Given a binary tree, print it in Top View of it. What is Top View: Top view means when you look the tree from the top the nodes you will see will...

Objective: Given an array of unsorted numbers, check if it contains all elements of some given range. Examples: int[] arrA = { 11, 17, 13, 19, 15, 16, 12, 14 }; Range : 12-15...

Objective: Given an array and an integer, find the Subarray whose sum is equal to the given integer. Examples: int[] arrA = { 25, 12, 14, 22, 19, 15, 10, 23 }; Integer =...

Objective: Given an array and an integer, find the smallest subarray whose sum is greater than the given integer. Examples: arrA[] = { 1, 5, 20, 70, 8} Integer = 97 Output : Min...

Objective: Find Kth Smallest or Largest element in an Array Example: int[] arrA = { 2, 3, 11, 16, 27, 4, 15, 9, 8 }; Output: The 4th smallest element is : 8 Approach:...

Objective: Given an array arrA[], find the maximum j – i such that arr[j] > arr[i]. Example: int[] arrA = { 12, 3, 1, 5, 6, 4, 10, 9, 8, 0 }; Output: Max(j-i)...

Input: Rotated Sorted Array. What is Rotated Sorted Array. A sorted array is rotated around some pivot element. See the Example Below, array is rotated after 6. Approach:

Objective: – Given Binary Tree, Print All The Nodes Which are X distance from the Leaf Nodes Example : Approach:

Objective: – Given Binary Tree, Print all the nodes which are X distance from the root Example : Appraoch:

Objective: – Find The Distance From Root To Given Node of a binary tree. What does Distance means : It means number of edges between two nodes. Approach:

Objective: – Given a binary tree, print it in vertical order sum What is Vertical Order Sum as you can see in the example above, [4],[2], [12],[3],[7] are the vertical order sum of the...

Objective: – Given a binary tree, print it in vertical order path. What is Vertical Order as you can see in the example above, [4],[2], [1,5,6],[3],[7] are the verical order of the given binary...

%d bloggers like this: