## Sorted Array to Binary Search Tree of Minimal Height

Objective: Given a sorted array with unique elements, Create a binary search tree with minimal height. Why minimal height is important : We can do the linear scan to the array and make the...

@tutorialhorizon

Objective: Given a sorted array with unique elements, Create a binary search tree with minimal height. Why minimal height is important : We can do the linear scan to the array and make the...

Objective: Write a program to Delete a Node in the Middle of a linked list, Given only access to that Node Example: Original List : ->1->2->8->3->7->0->4 After Deleting the mid node (say 7) :...

Objective: Given a linked list and integer ‘n’, write an algorithm to find the nth node from the end in the Linked List. Example: Original List : ->1->2->8->3->7->0->4 Output : 3rd Element from the...

Objective: Write an algorithm to check if one string is Rotation of another string. This question has been asked in the Amazon interview. Example: Input Strings : ‘sumitjain’ and ‘tjainsumi’ Output : true Input...

Objective: Reverse the given linked list. Input: A Linked List Output: Reversed Linked List Example: Input : ->30->25->20->15->10->5 Reversed : ->5->10->15->20->25->30 NOTE : Click Reverse a Linked List – Part 2 to see the...

Objective: This question was asked in Amazon interview for the Software development Engineer position, Write an algorithm to print all the elements of two dimensional array in spiral. Example : Input: Two dimensional array...

Objective: Write an algorithm to find out whether in a given array there exists or not two numbers whose sum is exactly equals to a given number. This problem has been asked in Amazon...

Objective : Write an algorithm to find Whether Given String is palindrome or Not. Input: A String, Output: true or false on whether string is palindrome or not Approach: Use recursive approach Compare first...

Objective : Write an algorithm to find two Missing Numbers in a Sequence of Consecutive Numbers Input: Array, arrA[] with two missing numbers and Range Output : Two missing numbers Approach: Approach is very...

%d bloggers like this: