Blog Archives

Algorithm Analysis

Binary search looks more efficient than linear search when the array is sorted. The efficiency (time complexity) of an algorithm can be measured by the running time as a function of the input data size. Such functions are called growth

Tagged with: ,
Posted in Algorithm, Java

Linear and Binary Search

Searching is to find a target in a collection of elements, or determine the target does not exist. Here we consider data in arrays stored in the memory; while in real problems data may be stored in disk files, databases,

Tagged with: , , ,
Posted in Algorithm, Java

Recursion

What is Recursion In general, recursion is the process of repeating items in a self-similar way. In programming, recursion is that a method calls itself to accomplish its purpose. Recursion appears in many areas. Arts: Drawing Hands by Escher, http://en.wikipedia.org/wiki/Drawing_Hands

Tagged with: , ,
Posted in Algorithm, Java