How to Change the Computer Name in Ubuntu

Open a terminal window. 2. At the input prompt you will see this structure: “nicholas@computer-name:~$ _ “ So you have to edit the hostname file: “sudo nano /etc/hostname “ When prompted, enter the administrator password and hit Enter. The hostname file will open, showing the current computer name. Replace the name…

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 for this problem. One is with recursive function and another is with iterative function. For this problem,…

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 purchase, the machine makes change to users with a combination of coins. And the machine only have…