Editing
Algorithms and Complexity
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== <span style="color: #FFFFFF;">Understanding</span> == In computer science, we don't care how fast an algorithm is for 10 items; we care how fast it is for 10 billion. **Big O Notation**: This is the "speed limit" of an algorithm. * **O(1)** (Constant): Takes the same time regardless of size (e.g., looking up an array index). * **O(log n)** (Logarithmic): Extremely fast; doubling the input only adds one step (e.g., Binary Search). * **O(n)** (Linear): Time grows directly with size (e.g., searching an unsorted list). * **O(nΒ²)** (Quadratic): Time grows with the square of size; becomes very slow quickly (e.g., Bubble Sort). * **O(2βΏ)** (Exponential): Becomes impossible for even small inputs (e.g., solving the Traveling Salesperson Problem exactly). **The P vs. NP Question**: The most famous unsolved problem in computer science. It asks: "If a solution to a problem can be verified quickly, can it also be solved quickly?" Most scientists believe P β NP, meaning there are some problems that are fundamentally "hard" for any computer. **Optimization**: Complexity theory tells us when to stop looking for a "perfect" answer. For NP-hard problems, we often use **Heuristics** or **Approximation Algorithms** that give a "good enough" answer in a reasonable amount of time. </div> <div style="background-color: #8B0000; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;">
Summary:
Please note that all contributions to BloomWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BloomWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information