Python Function to Solve the Chicken and Rabbit Math Problem November 2, 2020 algorithms, math, python No Comments Problem statement: Given a cage that has R rabbits and C chicken, and we know there are H heads and L legs. So find out the value of R … [Continue Reading...]
An Interview Question: O(n) Algorithm to Find Abs(Max Left – Max Right) March 6, 2017 c / c++, interview questions, math 2 Comments Given an array of numbers (for simplicity, we use integers), find the maximum value of abs(max left – max right) where we separate the array into two. Mathematically, given … [Continue Reading...]