Matsushita's Blog


Add One Row to Tree

問題 2分木が与えられ、与えられた深さに1行分ノードを追加するという問題 ソースコード

Implement Trie (Prefix Tree)

Problem Source Code

Trie Tree in Java

What is Trie Tree Trie Tree is one of the tree structure to search element. The feature of this tree that each node dose not have element information, but also each edge has element information. Trie tree is used to search String like dict…

Create a Linked List of all the nodes at each depth in Binary Tree

Problem Given a binary tree, design a algorithm which creates a linked list of all the nodes at each depth (e.g, if you have a tree with depth D, you'll have D linked lists) How to Solve The important point of the this problem How we shoul…

Make a Binary Search Tree from sorted array

Problem Given a sorted (increasing order) array with unique integer elements, write an algorithm to create a binary search tree with minimal height. How to Solve This problem asks me to create a BST (Binary Search Tree) from array. What is…