- Notifications
You must be signed in to change notification settings - Fork7
Code examples demonstrating the complexity classes O(1), O(log n), O(n), O(n log n), O(n²).
SvenWoltmann/o-notation-and-time-complexity
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
What is "Big O notation" and "time complexity"?
Code examples demonstrating the following complexity classes:
- O(1) - constant time (inserting elements at the beginning of a linked list)
- O(n) - linear time (summing up all elements of an array)
- O(n²) - quadratic time (sorting an array with Insertion Sort)
- O(log n) - logarithmic time (finding an element within a sorted array using binary search)
- O(n log n) - quasi-linear time (sorting an array with Quicksort)
The code belongs to this article:
- English:Big O Notation and Time Complexity – Easily Explained
- German:O-Notation und Zeitkomplexität – anschaulich erklärt
With this1-page PDF cheat sheet, you'll always have the7 most important complexity classes at a glance.
- Always choose the most efficient data structures and thus increase the performance of your applications.
- Be prepared for technical interviews and confidently present your algorithm knowledge.
- Become a sought-after problem solver and be known for systematically tackling complex problems.
👉Download the Big O Cheat Sheet
(Hier geht's zur deutschen Version →O-Notation Cheat Sheet)
Stay up-to-date with the latest Java features withthis PDF Cheat Sheet!
- Avoid lengthy research with thisconcise overview of all Java versions up to Java 23.
- Discover the innovative features of each new Java version, summarized on a single page.
- Impress your team with your up-to-date knowledge of the latest Java version.
👉Download the Java Versions PDF
(Hier geht's zur deutschen Version →Java-Versionen PDF)
👉 Want to level up your Java skills?Sign up for theHappyCoders newsletter and get regular tips on programming, algorithms, and data structures!
(Hier geht's zur deutschen Version →HappyCoders-Newsletter deutsch)
🇩🇪 An alle Java-Programmierer, die durch fundierte Kenntnisse über Datenstrukturen besseren Code schreiben wollen
Trage dich jetzt auf dieWarteliste von „Mastering Data Structures in Java“ ein, und erhalte das beste Angebot!
About
Code examples demonstrating the complexity classes O(1), O(log n), O(n), O(n log n), O(n²).
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.


