# 15.5 Summary

{% embed url="<https://youtu.be/keUNAiiGVy8>" %}

### **Takeaways**

* There are no magic shortcuts for analyzing code runtime.
* In our course, it’s OK to do exact counting or intuitive analysis.
* Know how to sum 1 + 2 + 3 + ... + N and 1 + 2 + 4 + ... + N.
* We won’t be writing mathematical proofs in this class.
* Many runtime problems you’ll do in this class resemble one of the five problems from today.&#x20;
* This topic has one of the highest skill ceilings of all topics in the course. All the tools are here, but **practice** is your friend!
* Different solutions to the same problem, e.g. sorting, may have different runtimes (with big enough differences for the runtime to go from impractical to practical!).
* $$N^2$$​​ vs. $$Nlog(N)$$ is an enormous difference.
* Going from $$Nlog(N)$$ to $$N$$ is nice, but not a radical change.

Hopefully, this set of examples has provided some good practice with the techniques and patterns of runtime analysis. You can also find extra practice problems in the next section. Remember, there are no magic shortcuts, but you have to tools to approach the problems. Go forth and analyze!!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cs61b-2.gitbook.io/cs61b-textbook/15.-asymptotics-ii/15.5-summary.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
