Solution to chi2012 (Cannonballs) by codility

7 Feb

Question: Question Name: chi2012 or Cannonballs

Solution to gamma2011 (Count-Palindromic-Slices) by codility

5 Feb

Question: Question Name: CountPalindromicSlices This task is based on the longest palindromic substring question, which has a good solution naming Manacher’s algorithm. Some explanation about the algorithm could be found here (English) and here (Chinese).

Solution to Array-Inversion-Count by codility

4 Feb

Question: Question Name: ArrayInversionCount

UPDATE on July 18, 2014: Thanks to @Andrew, there is another solution with Binary Indexed Tree. UPDATE on October 8, 2014: Thanks to @Piotrek Martynowicz, there was a bug for the statement: “computes the … Read More »

Solution to omega2013 (Falling-Disks) by codility

4 Feb

Question: Question Name: omega2013 or FallingDisks

Solution to Equi by codility

2 Feb

Question: Question Name: Equi The expected worst-case space complexity could be less than required.

Solution to Tree-Height by codility

29 Jan

Question: Question Name: TreeHeight Classic recursion problem.