X
Submit Question

Facebook  Questions

View By:

Q31 Print a singly-linked list backwards, in constant space and linear time

Print a singly-linked list backwards, in constant space and linear time.

Linked List  |  Level - 2

Answer Write Code Visit Question Page

Q32 Given a Binary Search Tree, iterate over the elements without using recursion

Given a Binary Search Tree, iterate over the elements without using recursion.

Trees and Graphs  |  Level - 2

Answer Write Code Visit Question Page

Q33 Implement a Queue using only Stacks

Implement a Queue using only Stacks and give the time complexity for queue and deque operations.

Data structure  |  Level - 2

Answer Write Code Visit Question Page

Q34 Write a solid, secure code for strstr()

Write a solid, secure code for strstr().

String Manipulation  |  Level - 3

Answer Write Code Visit Question Page

Q35 Find an element in a 2D array sorted both along row and column.

Write an efficient algorithm that searches for a value in an n x m table (two- dimensional array). This table is sorted along the rows and columns, that is,

Table[i][j] > Table[i][j + 1]

Table[i][j] > Table[i + 1][j]

C++  |  Level - 2

Answer Write Code Visit Question Page