News Feed
Jobs Feed
Sections




News Archive
Freek Lijten's Blog:
Expressing algorithm complexity the big O notation explained
August 04, 2011 @ 11:28:29

Freek Lijten has put together a new post to his blog looking at a method for showing how complex an algorithm is without having to get too deep into how it works - the big O notation (with examples written in PHP).

I'd like to share a topic today which was re-introduced to me by a lightningtalk of a colleague of mine. His talk was on the "big O notation". The big O notation is a tool you can use to express the order of complexity of an algorithm. It is useful because it lets you express the order of complexity of an algorithm without taking a lot of time profiling or researching the underlying algorithm. In other words: it gives you a quick way to gain an understanding of what might be wrong (or right) with a specific algorithm.

He introduces the notation as the result of a series of steps needed to solve a problem (ex. 2+2 is less complex than 2+2+2). He illustrates with PHP examples that show adding complexity to a class, adding sets of numbers, looping to find needles in haystacks and finding duplicates in an array of strings. Each of these expand on the theory and show more complexity as the article progresses.

0 comments voice your opinion now!
algorithm complexity explanation bigo notation


blog comments powered by Disqus

Similar Posts

Community News: Latest PECL Releases for 03.05.2013

Community News: Latest Releases from PHPClasses.org

Site News: Popular Posts for the Week of 07.17.2009

Community News: Latest PEAR Releases for 06.14.2010

Site News: Blast from the Past - One Year Ago in PHP


Community Events











Don't see your event here?
Let us know!


community opinion language rest conference interview functional database podcast usergroup testing release series zendframework2 introduction phpunit framework symfony2 symfony development

All content copyright, 2013 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework