Q 1: Find all possible set of 2 and 4 wheelers required to complete a trip. if not possible return 0.
for trips with required vehicles [6, 3, 2]
possible set [3, 0 ,1]
Q2. String is encoded in such a way that first letter is in first row, 2nd letter is in 2nd column of second row and so on, depends on the number of rows.
e.g.
String: my name is
number of rows : 3
encoding :
m n e s
y a
m i
and the ecoded string space is replaced with underscore (_):
mnes_ya__mi
write a code to decode it.
I was able to solve both the problems in 43 minutes with explanation