Skip to content

hchap1/Algorithm-Questions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Algorithm-Questions

Solutions to some algorithm questions.

The islands question:

In an array of equal-index-size (a square), 0 represents water, and 1 represents lands. All edges are considered 0 (water) regardless of value. Q: Calculate the number of islands in a given square.

E.g.

100110010 011010101 011100110 000010010 100101011 011010101 011100110 000010010 100101011

A: island_question.py

The age array question:

An array containing the age of every Australian is made.

E.g. 1,1,1,1,1,2,2,2,2,2,2,4,4,4,4,4,4.

Q: What's the most effecient way to get each unique age?

A: age_array.py

The web log question:

Q: Whats the most efficient way to get the most common transition between web pages? (Fields for each log are name, timestamp, website).

A: web_log.py.

If you have any questions, read the answer code.

About

Solutions to some algorithm questions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages