-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathQuestions and info.txt
More file actions
49 lines (37 loc) · 2.61 KB
/
Questions and info.txt
File metadata and controls
49 lines (37 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Question 1 (Lab 0 - not evaluated):
H index(274 leetcode)
Question 2 (Lab 1 - evaluated):
In this problem, a set of N points are given on the 2D plane. You have to find
the minimum distance pair of points.
For example:- P[] = {2, 3}, {12, 30}, {40, 50}, {5, 1}, {12, 10}, {3, 4}.
Minimum distance is 1.41 between pairs of points {2, 3} and {3, 4}.
Write a program divide and conquer algorithm with probable complexity order. Write your logic
as comments in the program for its better understanding and evaluation.
Question 3 (Lab 2 - evaluated):
Find no. of inversion pairs in an array
Question 4 (Lab 3 - not evaluated):
Find no. of rotations and search the query in rotated array
Question 5 (Lab 4 - evaluated):
Given a matrix find the maximum path sum in matrix,
where you are allowed to move only down or right.
You can start from any element in the matrix
but the ending point should be the bottom-right element of the matrix.
Question 6 (Lab 5 - evaluated):
There is a car starting from initial station marked as zero with full fuel tank, the distance a full capacity of fuel tank can cover is given, Distance mark of every fuel station is also given. You can fill the tank full in the fuel stations. You have to calculate if it will reach the end point before running out of fuel in minimum stoppages in the route.
Question 7 (Lab 6 - not evaluated):
Write an algorithm to determine whether a graph G is bipartite. If G is bipartite, your
algorithm should obtain a partitioning of the vertices into two disjoint sets. Show That if G is
represented by its adjacency lists,then this algorithm can be made to work in time O(n+e),where
n = |V| and e= |E|.
Question 8 (Lab 7 - not evaluated):
In this problem we will be considering a game played with four wheels. Digits ranging from 0 to 9
are printed consecutively (clockwise) on the periphery of each wheel. The topmost digits of the wheels
form a four-digit integer. Each wheel has two buttons associated with it. Pressing the button marked with
a left arrow rotates the wheel one digit in the clockwise direction and pressing the one marked with the
right arrow rotates it by one digit in the opposite direction.
The game starts with an initial configuration of the wheels. Say, in the initial configuration the
topmost digits form the integer S1S2S3S4. You will be given some (say, n) forbidden configurations
Fi1 Fi2 Fi3 Fi4
(1 ≤ i ≤ n) and a target configuration T1T2T3T4. Your job will be to write a program that
can calculate the minimum number of button presses required to transform the initial configuration to
the target configuration by never passing through a forbidden one.