## Binary Tree Paths

Title: Binary Tree Paths Source: leetcode.com Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 / \ 2 3 \ 5 12345    1 /   \2     3 \  5 All root-to-leaf paths are: ["1->2->5", "1->3"] 1 ["1->2->5", "1->3"] Java solution Java /* https://leetcode.com/problems/binary-tree-paths/ */ import java.util.List; import java.util.ArrayList; public ...

Title: Add Digits Source: leetcode.com Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has only one digit, return it. Follow up: Could you do ...

## Bulls and Cows

Title: Bulls and Cows Source: leetcode.com You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time your friend makes a guess, you provide a hint that indicates how many digits in said guess match your secret ...

## OnePlus One : The Review

Hello Everyone, We finally bring you the much awaited review of the super hyped and ‘The Flagship Killer’ titled mobile phone device. The One from OnePlus. While the specs are astonishing compared to its contemporary phones, with 3 GB RAM, Qualcomm Snapdragon 2.5 GHz Quad Core CPU chip, 13 MP Rear and 5MP front camera, ...

## Running Hadoop Example(TDG/CH02) on Cloudera Quick Start VM1

prerequisite 1. VMWare Player (Oracle VM box didn’t work for me) Download VMWare Player 2. Cloudera Quick Start VM Download Cloudera Quick Start VM 3. Download CH02 example java code from here. 4. create a folder BigDataAssignment1/code(name it whatever you want) inside /home/cloudera/workspace/ 5. Download hadoop-core-0.20.2.jar from here and place it inside code folder you ...

## The OnePlus One: unpacking in pictures.

Hi everyone, Wish you all a very happy and productive new year. đź™‚ Hope you are having an excellent run so far. For the first post of the new year we bring you the unpacking of one of the most talked about phone in tech community: the OnePlus One. Titled as “the flagship killer”, the ...

## Lossless Dependency Preserving 3NF decomposition Algorithm1

The minimal cover of F is given 1. Search for dependencies in F-having the same attribute set on the left hand side A: A->B1, A->B2, A->B3, …, A->Bk And construct relation as (A, B1, B2, B3,â€¦, Bk) 2. Construct a relation with remainder attributes. 3. In case none of the relations has a candidate key, ...

## Find maximal uni-directional path length for a Binary Tree1

Continuing from our last post for a Generic Binary Tree implementation, we’ve come up with a solution to quite an interesting problem. We define a path in a binary tree to be a non-empty sequence of nodes that one can traverse by following the pointers in the nodes. A path only goes to the right ...

## Implementing a Generic Binary Tree in Java2

The following two classes demonstrate an implementation of the Generic Binary Tree data structure. The first class is BinaryTreeNode.java which acts as the node class for the tree, holding integer type data and two pointers for left and right child respectively of type same as the node class itself. The member fields are declared to ...

## Data truncation: Incorrect datetime value: ” for column2

While usingÂ Acitiviti API you might encounter this error which says something like this ### Error updating database. Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value: ” for column ‘DEPLOY_TIME_’ at row 1### The error may involve org.activiti.engine.impl.persistence.entity.DeploymentEntity.insertDeployment-Inline### The error occurred while setting parameters### Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value: ” for column ‘DEPLOY_TIME_’ at row ...