Tagged: Intermediate

0

Merge or Combine Two Sorted Linked Lists

Objective: Given two sorted linked lists, objective is to merge both the lists in sorted order. Input: Two sorted linked list List a, List b. Example: List a : ->2->6->18 Listb: ->1->3->17->19 Merged List:...

3

Print All Elements of Two Dimensional Array in Spiral

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...

3

Valid or Well Formed Parentheses | Part – 1

Objective: You have been asked to Write an algorithm to find Whether Given the Sequence of parentheses are well formed. This question was asked in the Amazon Interview. Input: A String contains a sequence...

0

Find an Element in 2 dimensional sorted array

Objective : Write an algorithm to find an Element in 2 dimensional array where rows and columns are sorted respectively. Input: A two dimensional sorted array, arrA[][].   Output : True or false based...

0

Merge Sort – Updated – Most Efficient ways to Implement

Objective : Write Merge Sort algorithm to sort elements in an array Input: A unsorted array, arrA[]. Output : A sorted array. Approach: Divide and Conquer: In this approach we divide the main problems...

%d bloggers like this: