The problem of Inverting a Binary Tree has got some hype after following tweet.
Google: 90% of our engineers use the software you wrote (Homebrew), but you can’t invert a binary tree
The UVa 10664: Luggage is a typical example of the problems that can be solved using dynamic programming (DP) technique. In fact, after further analysis, this problem can be realized as a special
The UVa 100: The 3n+1 Problem is about collatz problem, which we have discussed in details in a recent post. The following Java code describes a brute-force algorithm to solve this
This post focuses on Collatz problem, which is also known as, among others, the 3n+1 problem, and the Syracuse problem.
Outline. We begin by introducing Collatz conjecture; afterwards, we presents an algorithm
The Party Schedule problem, published in SPOJ website, is about deriving an optimal set of parties that maximizes fun value, given a party budget:
and
parties:
where each party
have an entrance cost