Solution to Common-Prime-Divisors by codility

18 Feb

Question: Question Name: CommonPrimeDivisors

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 »