## Solution to Odd-Occurrences-In-Array by codility

18 Sep

Question: https://codility.com/programmers/task/odd_occurrences_in_array Question Name: Odd-Occurrences-In-Array or OddOccurrencesInArray This question is completely the same as the Perm-Missing-Elem by codility. The comment from Kim is very helpful.

## Solution to Number-Solitaire by codility

6 Sep

Question: https://codility.com/demo/take-sample-test/number_solitaire/ Question Name: Number-Solitaire or NumberSolitaire The key point is: to achieve the position i, we can only come from the positions i-6, i-5, i-4, i-3, i-2, and i-1.

## Solution to Max-Nonoverlapping-Segments by Codility

4 Sep

Question: https://codility.com/demo/take-sample-test/max_nonoverlapping_segments/ Question Name: Max-Nonoverlapping-Segments or MaxNonoverlappingSegments It is an easy solution, but a bit hard to prove it. Let’s scan from left to right, according to the end points. Since the input has already been sorted with the end … Read More »

3 Sep

## Solution to Isomorphic Strings by LeetCode

1 Sep

Question: https://leetcode.com/problems/isomorphic-strings/ Question Name: Isomorphic Strings The key point is to avoid 2+ characters map to the same character.

## Solution to Count Primes by LeetCode

29 Aug

Question: https://leetcode.com/problems/count-primes/ Question Name: Count Primes

29 Aug

## Solution to Happy Number by LeetCode

29 Aug

Question: https://leetcode.com/problems/happy-number/ Question Name: Happy Number

## Solution to Bitwise AND of Numbers Range by LeetCode

23 Aug

Question: https://leetcode.com/problems/bitwise-and-of-numbers-range/ Question Name: Bitwise AND of Numbers Range A variant of number of 1 bits in an interger. For any non-zero interger 0b?????????1000 (? could be 1 or 0, and there are zero or one or more 0s after … Read More »

## Solution to Number of Islands by LeetCode

31 Jul

Question: https://leetcode.com/problems/number-of-islands/ Question Name: Number of Islands A variant of weighted quick union.