Category: programming languages
Given the root of a binary tree, the level of its root is 1, the level of its children is 2, and so on. Return the smallest level X …
You have some sticks with positive integer lengths. You can connect any two sticks of lengths X and Y into one stick by paying a cost of X + …
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), …