You're given string S consisting of 0's and 1's,
it's ugliness value equals to its decimal conversion
u have to minimize it's ugliness if u are given CASH
and u are only allowed to do following operations:
findSmallest(int N, string S, int CASH, int A, int B);Return the no of operations needed to this? (ans % mod)
input:
9
111100111
7
2
1
output:
7Given strength S of boxes, u can throw a ball into any box,
when u throw a ball into box i two things happen:
minBalls(int N, vector<int> S);Return minimum no of balls u have to throw to make strength of
all boxes equal to 1? (ans % mod)
input:
2
2 3
output:
3Given a binary tree, return no of ways u can paint the nodes with
only 2 colors W & B, such that distance between each B is atleast K.
(ans % mod)
totalWays(int N, vector<int> parent, int K);All nodes should colored either W or B.
input:
5
-1 0 0 1 1
2
output:
14[This was way out of my league:/]
Coding platform was really one of the best: InfyTQ