“There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies.”
C.A.R. Hoare, 1980 ACM Turing Award Lecture
In order to bring back love letters, we must first bring back the real lovers, and in order to bring back the real lovers, we must bring back emotional intelligence, kindness, empathy, and consideration.
If you dated a girl in secondary school you would understand what he said. Just seeing them alone ehn😀 or those sunday evenings knowing you will see them tomorrow.
learnt how to solve path sum III today, took some digging around the solutions to find one with a dfs solution I wanted to learn. Here, we're using a hashmap to look up how many paths end at the current node to avoid manually checking every path so we have an O(n) solution
Can you solve this higher order functions problem:
console.log(every([1, 3, 5], n => n < 10));
// → true
console.log(every([2, 4, 16], n => n < 10));
// → false
console.log(every([], n => n < 10));
// → true
Can you solve this higher order functions problem:
console.log(every([1, 3, 5], n => n < 10));
// → true
console.log(every([2, 4, 16], n => n < 10));
// → false
console.log(every([], n => n < 10));
// → true
Can you solve this higher order functions problem:
console.log(every([1, 3, 5], n => n < 10));
// → true
console.log(every([2, 4, 16], n => n < 10));
// → false
console.log(every([], n => n < 10));
// → true
Write a higher-order function loop that provides something like a for loop statement. It should take a value, a test function, an update function, and a body function. Each iteration, it should first run the test function on the current loop value and stop if that returns false.
Write a higher-order function loop that provides something like a for loop statement. It should take a value, a test function, an update function, and a body function. Each iteration, it should first run the test function on the current loop value and stop if that returns false.
It should then call the body function, giving it the current value, and finally call the update function to create a new value and start over from the beginning.
When defining the function, you can use a regular loop to do the actual looping
Write a higher-order function loop that provides something like a for loop statement. It should take a value, a test function, an update function, and a body function. Each iteration, it should first run the test function on the current loop value and stop if that returns false.