Time Complexity / Space Complexity (if it matters)
Part 1: O(n)
Part 2: O(n)
where n is number of numbers
Part 1: O(n)
Part 2: O(n)
where n is number of commands
Part 1: O(LB)
Part 2: O(LB)
where L is number of lines, B is numbers of bits (string length)
Part 1 & 2: O(NBS²)
where N is length of Bingo Numbers, B is number of Bingo Tables, S is width of Bingo Table
Part 1: O(LS²) / O(S²)
Part 2: O(LS²) / O(S²)
where L is number of lines, S is width of the grid
Part 1 (Brute Force): O(I*2^D)
Part 2 (Dynamic Programming): O(D + I)
where I is initial number of fishes, D is number of days
Part 1: O(NlogN)
Part 2: O(NM)
where N is number of crabs, M is maximum of horizontal position of crabs
Part 1: O(NM)
Part 2 (Flood Fill): O(NM)
where N is rows, M is cols
Part 1: O(N²) Does not work for all cases
Part 2: O(K³N³)
where N is width and height of cave, K is number of times the cave width