Wednesday, April 16, 2014

algorithms

Algorithm - a small procedure that solves a recurrent problem.

What is a computer algorithm?

To make a computer do anything, you have to write a computer program. To write a computer program, you have to tell the computer, step by step, exactly what you want it to do. The computer then "executes" the program, following each step mechanically, to accomplish the end goal.

When you are telling the computer what to do, you also get to choose how it's going to do it. That's where computer algorithms come in. The algorithm is the basic technique used to get the job done. Let's follow an example to help get an understanding of the algorithm concept.

Let's say that you have a friend arriving at the airport, and your friend needs to get from the airport to your house. Here are four different algorithms that you might give your friend for getting to your home:

The taxi algorithm:
  • Go to the taxi stand.
  • Get in a taxi.
  • Give the driver my address.
(continue to site...)

http://algorithms.openmymind.net/

Top 10 Algorithms for Coding Interview

Videos
http://www.computerscienceforeveryone.com/Course_1/Unit_13/Lesson_1/

http://www.scifac.ru.ac.za/javabook/ch02.htm

SORTING ALGORITHMS IN RUBY, PART 1

Algorithm LargestNumber
  Input: A non-empty list of numbers L.
  Output: The largest number in the list L.
  largest ← L0
  for each item in the list (Length(L)≥1), do
    if the item > largest, then
      largest ← the item
  return largest

Ruby Projects

https://www.learnstreet.com/lessons/study/ruby#get-hint

No comments:

Post a Comment