app Interview Practice Extra 07 - Universal Value Binary Tree Question Design an algorithm to verify that a tree is a universal value binary tree. Universal value binary tree means all value in that tree is the same. Solution There is two approach

5 cent Interview Practice Extra 06 - Vending Machine Question This is an actual question I encountered in an Amazon phone interview in November 2013. You are going to design the money changing algorithm for a vending machine. That is, after any

extra Interview Practice Extra 05 – Identify Prime Numbers Question Write an algorithm to identify prime numbers from a list of numbers ranging 0-100. Solution The main question is actually to write a program to check if a number is prime. There

extra Interview Practice Extra 04 – Remove Node from Singly Linked List Question How do you remove a node from a singly linked list, given only that node? Head node is not given. Solution Set next of this node to the next of the next

app Interview Practice Extra 03 - Verify Binary Tree with Same Value Question Verify whether all nodes have the same value in a binary tree. Solution We can traverse the tree with our usual way, like depth-first or breadth-first algorithm. Then pass a value, probably

extra Interview Practice Extra 02 - Duplicates in List Question Write an algorithm to remove duplicated node from a linked list. Solution There are many ways to do it. For the first one, as the simplest one, we could use 2 loops

extra Interview Practice Extra 01 - Find Loop in Linked List Question Validate a linked list whether there is a loop in it. That is, there is a node in a linked list with the next pointer pointing to a node ahead in the

app Mbox Mail for Mac is actually working on Lion Once I thought the Mbox Mail for Mac doesn’t work in Lion. The reason is that when I use the same setting in Thurderbird, i can receive emails. This made me ensure

cha Convert character encoding in PHP Usually while we extract information from other websites, character encoding might not correct. For example, j-jis.com is encoded with Shift-JIS. Therefore if your MySQL charset is UTF-8, it causes incorrect information. To