## Algorithms | Dynamic Programming | Question 7

Which of the following standard algorithms is not Dynamic Programming based. (A) Bellman–Ford Algorithm for single source shortest path (B) Floyd Warshall Algorithm for all… Read More »

## Algorithms | Divide and Conquer | Question 6

Which of the following algorithms is NOT a divide & conquer algorithm by nature? (A) Euclidean algorithm to compute the greatest common divisor (B) Heap… Read More »

## Algorithms | Sorting | Question 6

Consider a situation where swap operation is very costly. Which of the following sorting algorithms should be preferred so that the number of swap operations… Read More »

## Algorithms | Sorting | Question 5

Given an unsorted array. The array has this property that every element in array is at most k distance from its position in sorted array… Read More »

## Algorithms | Searching | Question 3

Given a sorted array of integers, what can be the minimum worst case time complexity to find ceiling of a number x in given array?… Read More »

## Algorithms | Sorting | Question 4

Which of the following sorting algorithms in its typical implementation gives best performance when applied on an array which is sorted or almost sorted (maximum… Read More »

## Algorithms | Searching | Question 2

Which of the following is correct recurrence for worst case of Binary Search? (A) T(n) = 2T(n/2) + O(1) and T(1) = T(0) = O(1)… Read More »

## Algorithms | Sorting | Question 3

Which of the following is not a stable sorting algorithm in its typical implementation. (A) Insertion Sort (B) Merge Sort (C) Quick Sort (D) Bubble… Read More »

## Algorithms | Sorting | Question 2

Suppose we have a O(n) time algorithm that finds median of an unsorted array. Now consider a QuickSort implementation where we first find median using… Read More »

## Algorithms | Sorting | Question 1

What is recurrence for worst case of QuickSort and what is the time complexity in Worst case? (A) Recurrence is T(n) = T(n-2) + O(n)… Read More »

## Algorithms | Analysis of Algorithms (Recurrences) | Question 2

What is the value of following recurrence. T(n) = 5T(n/5) + , T(1) = 1, T(0) = 0 (A) Theta (n) (B) Theta (n^2) (C)… Read More »

## Algorithms | Analysis of Algorithms (Recurrences) | Question 1

What is the value of following recurrence. T(n) = T(n/4) + T(n/2) + cn2 T(1) = c T(0) = 0 Where c is a positive… Read More »

## Algorithms | Searching | Question 1

What is the output of following program? filter_none edit close play_arrow link brightness_4 code #include <stdio.h>    void print(int n, int j) {    if (j… Read More »