Today's Question:  What weekend projects have you created?

### Sort an array with only one local variable

Array sorting algorithm question is frequently asked during technical interviews. There are lots of sort algorithms including bubble sort, selection sort, insertion sort, quick sort, merge sort etc. Usually interviewees will be asked to implement sort algorithms. But have you ever been asked to sort an array which you are allowed to define ONLY ONE local variable in your algorithm?  Bubble sort can be used to do this actually. Normally a bubble sort algorithm may need three local ...

### Traditional recursion vs Tail recursion

Recursion is a frequently adopted pattern for solving some sort of algorithm problems which need to divide and conquer a big issue and solve the smaller but the same issue first. For example, calculating fibonacci  accumulating sum and calculating factorials. In these kinds of issues, recursion is more straightforward than their loop counterpart. Furthermore, recursion may need less code and looks more concise. For example, let's calculate sum of a set of numbers starting with 0 and st...

### How does Base64 work

Base64 is a data encoding scheme used in safe data transfer such as HTTP and its extensions. Base64 encoding can conver arbitrary group of bytes into a sequence of readable ASCII characters. These converted characters can safely put in a HTTP header without causing any problem while the peers process the HTTP header. Base64 encoding was invented as part of the MIME content transfer encoding. It is similar to other encoding schemes such as Uuencode and BinHex but with higher efficiency....

3,404 2          ALGORITHM BASE64

### Algorithm : Reverse singly linked list

Questions about singly linked list are the lovers of interviewers during interviews given the characteristic that singly linked list is one-directional list and it's difficult to get the previous node of one node without some buffering tricks.  In this post, we will demonstrate one of the most frequently asked question about singly linked list -- Reversing the singly list. Given the first node of a singly linked list, reverse the singly linked list. For example : A->B->C->D After ...

1,339 0          C ALGORITHM INTERVIEW

### Algorithm : Delete middle node from singly linked list

Questions about singly linked list are frequently asked during technical interviews. Today we will share with you one algorithm question about singly linked list. Here is the problem description. Assuming the only information you are giving is there is a pointer to a middle node of a singly linked list, no other information about the linked list is given. Please delete this node and don't affect the structure of the linked list. Initially you may think this question is easy if you know the hea...

2,616 0          C ALGORITHM LINKED LIST

### Measure the improvement of Google search algorithm

On the day of Google's 15th birthday, Google released its new "Hummingbird" search algorithm, this is the first time that Google changes its search algorithm since 2010 after the Caffeine algorithm. It will affect 90% of search results, according to Amit Singhal, Lead of Google Search. Some may be curious about how Google measures the improvement of a new search algorithm. There are many factors need to be considered, for example, accuracy, relevance, search depth etc. According to Amit Singhal...

### Generate first N prime numbers

Recently I am taking an online course named "Startup Engineering" on coursera. There is one assignment which is to use NodeJS to write a program to generate the first 100 prime numbers. This may be very easy for many people. Here I just want to share with you the code to generate not only the first 100 prime numbers. but also any number of prime numbers. Below is the code snippet: //Helper class to generate prime numbers var PrimeProcessor=(function(){ var primeArray=[]; functio...