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.
Lisa's Workbook
Lisa's Workbook
Sort by
recency
|
947 Discussions
|
Please Login in order to post a comment
Python: Semi-short looping solution…
Here's a semi-short, non-looping functional solution…
It could be shorter, but I've seen people complain about the readability of functional code. So, I tried to make this descriptive. I used verbose names for lambda arguments. I also added lambdas for accessing the members of tuples returned from the inner map levels.
Here's a terse version of the same code…
Here is problem solution in Python, Java, C++, C and Javascript - https://programmingoneonone.com/hackerrank-lisas-workbook-problem-solution.html
Here is my c++ solution
int workbook(int n, int k, vector arr) { vector> pages; int specialCount = 0;
}
Here is my c++ solution , you can watch the explanation here : https://youtu.be/3L-haDbsjAg
Perl: