Tag: C/C++ coding exercise
The following puzzle is taken from Timus Online Judge and You can submit your solution at this URL: http://acm.timus.ru/problem.aspx?space=1&num=2025 We first compute the average size n/k so we can …
The echo always responses the same text as input until you terminates it by Ctrl+C or Ctrl+Z (End of Line). This is more useful than “Hello, World” in the …
Here is another nice coding exercise from Leetcode Online Judge: https://oj.leetcode.com/problems/find-minimum-in-rotated-sorted-array/ Assume a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 …
September 5, 2014
algorithms, beginner, c / c++, code, code library, math, optimization, programming languages, recursive, tricks
We all know the formula to compute value e (mathematical constant that is the base of the natural logarithm) is e = 1 + 1/1!+ 1/2!+ .....+ 1/n! Now, …
February 18, 2014
algorithms, beginner, brainfuck, c / c++, code, code library, data structure, implementation, programming languages, string
The problem is from LeetCode Online Judge . The puzzle appears to be the most-favourite interview questions. It asks you to implement an algorithm to check if a given …