24
Jun
The Chores For anyone having been in programming a couple of years, chances are you've run into an interview question or an assignment like iterator for binary tree. There are variants like for the "pre-order", "post-order" or "in-order" traversal; or sometimes you got a n-ary tree instead of a bnary tree. A reason this kind of question is used in interviews is because they require some meticulous attention to details, to make sure you've considered all edge cases etc. Another familiar concept that are sometimes discussed: how do you create a Stream<Integer> representing the (infinite) Fibonacci sequence? The one thing…