Anime Screenshot Series – Tsugumomo

Hello Everyone!

It’s been a while right?

The screenshots are from Tsugumomo. I couldn’t take HQ screenshots but I will update as soon as I get my hands on a higher quality video 🙂

This slideshow requires JavaScript.


And this one is from Renai Boukun


See you later ^_^



How to solve ‘removeDuplicateAdjacents’ in CodeFights

The Problem

Given a string s, recursively remove any adjacent duplicate characters that it contains.


  • For s = "cooodefightssforrrcodee", the output should be
    removeDuplicateAdjacent(s) = "cdefightfocod".
  • For s = "acaaabbbacdddd", the output should be
    removeDuplicateAdjacent(s) = "acac".


  • [time limit] 4000ms (py)
  • [input] string s

    A string composed of lowercase English letters.


    1 ≤ s.length ≤ 50.

  • [output] string

    A string obtained by removing all adjacent duplicates from the input string.

The Solution


The Explanation

Continue reading “How to solve ‘removeDuplicateAdjacents’ in CodeFights”

CodeFights Problems

Stay tuned for more solution/explanations.

If you have a question you want to see the solution of, comment below so that I can help you!

Also, I figured out how to put actual code snippets with indentation and all, so, the newer ones will have the code as a text instead of an image.

How to solve “sumOfTwo” in CodeFights

The Problem:

You have two integer arrays, a and b, and an integer target value v. Determine whether there is a pair of numbers, where one number is taken from a and the other from b, that can be added together to get a sum of v. Return true if such a pair exists, otherwise return false.


For a = [1, 2, 3], b = [10, 20, 30, 40], and v = 42, the output should be
sumOfTwo(a, b, v) = true.

Continue reading “How to solve “sumOfTwo” in CodeFights”

How to Solve ‘DifferentRightmostBit’ in CodeFights

The Problem

You’re given two integers, n and m. Find position of the rightmost bit in which they differ in their binary representations (it is guaranteed that such a bit exists), counting from right to left.

Return the value of 2position_of_the_found_bit (0-based).


For n = 11 and m = 13, the output should be
differentRightmostBit(n, m) = 2.

1110 = 10112, 1310 = 11012, the rightmost bit in which they differ is the bit at position 1 (0-based) from the right in the binary representations.
So the answer is 21 = 2.


  • [time limit] 4000ms (py)
  • [input] integer nConstraints:
    0 ≤ n ≤ 230.
  • [input] integer mConstraints:
    0 ≤ m ≤ 230,
    n ≠ m.
  • [output] integer

Continue reading “How to Solve ‘DifferentRightmostBit’ in CodeFights”

A little Python!

The programming language one, not the snake one!

Hello pals!
Some time ago, I came across a problem in which I had to flatten an array of objects. That is, the elements of the array can be primitives or arrays. The end results is to be an array of primitives.

I used python to implement this since it allows much more compact snippets for such jobs.

Here is the code 🙂

def flatten(lst):
 return sum( ([x] if not isinstance(x, list) else flatten(x)
 for x in lst), [] )
lst = [[1], 2, [[3,4], 5], [[[]]], [[[6]]], 7, 8, []]
print flatten(lst)

Continue reading “A little Python!”

Color Palette Design Illustrator

Hello pals!

I’ve designed a color palette for a game I’m working on. I don’t have a tutorial about it but I think it is easy to prepare if there is any request.

In the simplest words, I started out for a minimalist color palette design. Then, I lost control of myself and made it a bit more complicated and detailed. With the time restrictions, it was still pretty straightforward, though.

The image is below in this page. Continue reading “Color Palette Design Illustrator”