Android: Localization

Introduction The next step in development Android application will be localization. I’ve read documentation from official site and from http://www.icanlocalize.com/ and decided to describe it. Sequence of resources lookup How does android lookup the resources from applications? The example of lookup steps below: ‘res/values-en-rUS/strings.xml’ ‘res/values-en/strings.xml’ ‘res/values/strings.xml’ Firsltly Android looks for resources in en-rUS folder if not found, looks in -en folder and just after it in default. If resource has been found then  the search stops. Dismantle folders structure The next question that worried me…

"Android: Localization"

PlayFramework: Run and Debug Using IDE

Introduction I think each of us looking for the best IDE and best way of development. I think the best code editor is IntellJ IDEA and I am using it for 6 years. A few month ago I’ve started to use PlayFramework and were surprized that there is no way to debug application using IDE just browser and console logs and messages. After short investigation I’ve found solution … Solution This step-by-step solution for IntellJ…

"PlayFramework: Run and Debug Using IDE"

Algorithms: Customization Binary Search

I had some interviews into big companies like Google, Amazon and so on, and there were tasks related to the algorithms. So, Here I’ll describe one of the tasks and publish code for this algorithm. Note, during interview you can chose algorithm by your self and time for implementation (runtime implementation) about 30 mins….. Predefined: There is dictionary of words with unspecified size, we just know that all words in dictionary are sorted (for example by alphabet). Also we have…

"Algorithms: Customization Binary Search"

Linked List Cycle / II Algorithm

Today we will learn how to solve two problems from leetcode – Linked List Cycle and Linked List Cycle II. So, as you can see these problems are related but first easiest and second more complex. OK, first task description: Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? So, it’s easy if you know Robert W. Floyd algorithm also called “tortoise and the hare” algorithm. Full…

"Linked List Cycle / II Algorithm"

Algorithm {Binary Tree Level Order Traversal II}

Binary Tree Level Order Traversal Today we will work on the tree traversal task – Binary Tree Level Order Traversal II. We can see that task is pointed as second (II) it means not simple/classic level order traversal, so, let’s read task description: Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left to right, level by level from leaf to root). For example: Given binary tree {3,9,20,#,#,15,7},…

"Algorithm {Binary Tree Level Order Traversal II}"