Solution to Count-Non-Divisible by codility

28 Jan

Question: https://codility.com/demo/take-sample-test/count_non_divisible Question Name: CountNonDivisible

Solution to boron2013 (Flags) by codility

27 Jan

Question: https://codility.com/demo/take-sample-test/flags Question Name: boron2013 or Flags The official solution is here. UPDATE 2014-10-02: thanks to Piotrek Martynowicz, a bug is found and fixed.

Solution to Peaks by codility

26 Jan

Question: http://codility.com/demo/take-sample-test/peaks Question Name: Peaks UPDATE on July 18th 2015: Many thanks to @Antonio Correia (https://34.145.67.234/2014/solution-to-peaks-by-codility/#comment-11725) !!! @Antonio Correia found a huge bug in my solution, even though it passed the codility.com. The bug has been fixed.

Solution to Max-Slice-Sum by codility

26 Jan

Question: http://codility.com/demo/take-sample-test/max_slice_sum Question Name: MaxSliceSum The classic maximum subarray problem. It should be the very first question in this lesson.

Solution to Max-Profit by codility

25 Jan

Question: http://codility.com/demo/take-sample-test/max_profit Question Name: MaxProfit For this question, we have to travel from the last element to the first one.

Solution to Equi-Leader by codility

24 Jan

Question: http://codility.com/demo/take-sample-test/equi_leader Question Name: EquiLeader A variant of the previous question.

Solution to Dominator by codility

24 Jan

Question: http://codility.com/demo/take-sample-test/dominator Question Name: Dominator Same question in the introduction pdf.

Solution to Fish by codility

23 Jan

Question: http://codility.com/demo/take-sample-test/fish Question Name: Fish UPDATE 03-14-2014: “downstream_count” is a redundant variable. It could be replaced with len(downstream) safely. (Thanks to the reminder from┬áMax)