Algorithms | NP Complete | Question 5

Which of the following statements are TRUE? (1) The problem of determining whether there exists a cycle in an undirected graph is in P. (2)… Read More »

Algorithms | Graph Shortest Paths | Question 7

What is the time complexity of Bellman-Ford single-source shortest path algorithm on a complete graph of n vertices? (A) (B) (C) (D) Answer: (C) Explanation:… Read More »

Data Structures | Graph | Question 8

Consider an undirected random graph of eight vertices. The probability that there is an edge between a pair of vertices is 1/2. What is the… Read More »

Data Structures | Graph | Question 9

Which of the following statements is/are TRUE for an undirected graph? P: Number of odd degree vertices is even Q: Sum of degrees of all… Read More »

Data Structures | Balanced Binary Search Trees | Question 9

Which of the following is true about Red Black Trees? (A) The path from the root to the furthest leaf is no more than twice… Read More »

Data Structures | Balanced Binary Search Trees | Question 13

Which of the following is true (A) The AVL trees are more balanced compared to Red Black Trees, but they may cause more rotations during… Read More »

Data Structures | Balanced Binary Search Trees | Question 7

Consider the following left-rotate and right-rotate functions commonly used in self-adjusting BSTs T1, T2 and T3 are subtrees of the tree rooted with y (on… Read More »

Data Structures | Balanced Binary Search Trees | Question 13

Which of the following is a self-adjusting or self-balancing Binary Search Tree (A) Splay Tree (B) AVL Tree (C) Red Black Tree (D) All of… Read More »

[TopTalent.in] In Conversation With Nithin On What It Takes To Get Into Goldman Sachs

Goldman Sachs is well known for their lengthy interview process. There’s no denying it. GS interview process is really, really tough but it’s certainly not… Read More »

C# Program for Maximum sum rectangle in a 2D matrix | DP-27

Given a 2D array, find the maximum sum subarray in it. For example, in the following 2D array, the maximum sum subarray is highlighted with… Read More »

Java Program for Maximum sum rectangle in a 2D matrix | DP-27

Given a 2D array, find the maximum sum subarray in it. For example, in the following 2D array, the maximum sum subarray is highlighted with… Read More »

C Program for Maximum sum rectangle in a 2D matrix | DP-27

Given a 2D array, find the maximum sum subarray in it. For example, in the following 2D array, the maximum sum subarray is highlighted with… Read More »

Maximum sum rectangle in a 2D matrix | DP-27

Given a 2D array, find the maximum sum subarray in it. For example, in the following 2D array, the maximum sum subarray is highlighted with… Read More »

Data Structures | Balanced Binary Search Trees | Question 5

Consider the following AVL tree. 60 / \ 20 100 / \ 80 120 Which of the following is updated AVL tree after insertion of… Read More »

Data Structures | Balanced Binary Search Trees | Question 4

Which of the following is AVL Tree? A 100 / \ 50 200 / \ 10 300 B 100 / \ 50 200 / /… Read More »