Standard algorithms

The two standard algorithms I will be talking about is count occurrences and linear search.

Count occurrences is a type of algorithm in which a number that is defined by the user will be run through a list that is either also defined by the user or hard coded into the program. The amount of times the number is found will be relayed back to the user once all of the list has been searched.

Linear search also gets a number from the user and runs it through a list(defined by user or hard coded) and the program will look through the code and find where it is. Once done the program will tell the user what position in the list it is.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s