Round 1: Create a priority queue using any data structure you think would be good.
Round 2:
Round 3: A carpenter has an inventory of some logs of certain lengths and some orders of certain lengths, return True, if the farmer can fullfill the order, False otherwise
Example of Inventory:
Logs Length
2 20m
5 2m
Example of Orders
Logs Length
1 20m
7 2m
In this case, it would should return True, but think about cases when highest log is of 20m but order is of 27m, cases where you have 17m orders, cover all those cases.
Question 4:
Given n (always odd) design a n * n matrix, where 1 is in the middle position and you go spiral, growing outwards
Example:
n = 3
9 8 7
2 1 6
3 4 5