Category: programming languages
You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path does not …
There is a fence with n posts, each post can be painted with one of the k colors. You have to paint all the posts such that no more …
The FizzBuzz is a good example to start learning a programming language – which contains the exercise of using a loop (either for-loop or a while-loop), Arithmetic operations (modulus), …
Let U = represent a increasing series of points; xu0 < xu1 && yu0 < yu1, etc. Let D = represent a decreasing series of points; xd0 < xd1 …
This is quite similar to the Two Sum puzzle. Given a collection of numbers, write a function that finds a pair that will sum to a given value. For …