Answer: ByteDance OA - 2nd Oct
by
haxor
•
0
thanks @Papa!<br>
Using this I think we can precompute for all possible card-decks of [1-10],[1-10],[1-10],[1-10].<br>
Then it will be ea…
Answer: ByteDance OA - 2nd Oct
by
papa
•
150
<h1>Problem 5</h1>
Hint is in this easier subproblem.
<h3>Subproblem</h3>
Given any four number can we calculate if it sums to 24?
…
Answer: ByteDance OA - 2nd Oct
by
papa
•
150
Problem 5 - Hint for an easier problem [Given any four numbers, can we calculate if it sums to 24]
Backtracking Solution :
class Sol…
Answer: ByteDance OA - 2nd Oct
by
haxor
•
0
<h1>Problem 3</h1>
You can use this code to find prefix sum of matrix - <a href = "https://ideone.com/SETqip">Code Link</a>.<br>
After th…
Answer: ByteDance OA - 2nd Oct
by
haxor
•
0
Here are my attempts. Anybody who got 5/5 ?
Problem 5 -> Bruteforce is sufficient.
Problem 3 -> O(N^2) using prefix sum over matrix. Th…