We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Interview Preparation Kits
- Lego Blocks
- Discussions
Lego Blocks
Lego Blocks
Sort by
recency
|
81 Discussions
|
Please Login in order to post a comment
Main points to take care about are: 1) calculate total number of combination per row using dynamic programming 2) inclusion/exclusion concept by splitting the wall on 2 parts - use dynamic programming for better performance 3) Fast/binary exponentiation by squaring the base and halving the exponent
Java code
Anyone know how I can improve my score (83.33) to 100.00. I've done all the optimisations I could think of..
class Result {
}
this question would be Hard Level in Leetcode
One of the dumbest question I have ever seen. This is mathematical problem not algorithm or data structure.
┌──┬─┐
┼──┼─┼
┼──┴─┼
└────┘
Is this a valid wall? There are 2 rows with the same breaks but the total break doesnt reach the full height.