You are on page 1of 4

WEEK1_ERK_DAA

1. An item holding rack is designed to hold 12 items vertically with


bottom racks hold heavy weighed item and we move up the
holding capacity of racks decreases. Arrange the following items
accordingly

Test Case-1

Weights of Items are -


87, 67, 21, 59, 99, 46, 84, 32, 43, 12, 90, 23

Arranged Items in Shelf is –


12
21
23
32
43
46
59
67
84
87
90
99
Test Case – 2

Weights of Items are -


9, 6, 6, 5, 8, 11, 4, 3, 21, 45, 22, 67
Arranged Items in Shelf is –
3
4
5
6
6
8
9
11
21
22
45
67

2. Online delivery apps always choose to deliver the nearest order


first, then after delivering the first order, it searches for the next
nearest delivery location. Arrange these distances

Test Case –1

Order distances -
Order Number 1 2 3 4 5
Distance 3 6 1 5 2
Priority of Order delivery–
1, 2, 3, 5, 6, 12
Test Case –2

Order distances -
Order Number 5 4 3 2 1
Distance 2 12 38 23 54
1
Priority of Order delivery–
12 21 23 38 54

3. The digital music library having the song of different playtime place
the songs to play short playtime first and longer playtime last
Test Case –1

Playtime of Songs -

Track 6
1
Track 7
2
Track 4
3
Track 7
4
Track 2
5

Order of playtime–
2
4
6
7
7

Test Case –2

Playtime of Songs -

Track1 12
Track2 32
Track3 46
Track4 22
Track5 7

Order of playtime–
7
12
22
32
46

You might also like