Merge pull request #1 from fterh/fterh-patch-1

Update README.md
pull/111/head
Fabian Terh 7 years ago committed by GitHub
commit ccc97fe56e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -52,7 +52,7 @@ Use a mix of functional and imperative programming paradigms:
- Avoid relying on and mutating global variables. Global variables introduce state.
- If you have to rely on global variables, make sure that you do not mutate it by accident.
Generally, to improve the speed of a program, we can either choose a more appropriate data structure/algorithm or use more memory. It's a classic space/time tradeoff.
Generally, to improve the speed of a program, we can either: (1) choose a more appropriate data structure/algorithm; or (2) use more memory. The latter demonstrates a classic space/time tradeoff. Therefore, it is not necessarily the case that you can only achieve better speed at the expense of space. Also, note that there is a limit to how fast your program can run (at least in terms of time complexity). For instance, a question that requires you to find the smallest/largest element in an unsorted array cannot run faster than O(N).
Data structures are your weapons. Choosing the right weapon for the right battle is the key to victory. Be very familiar about the strengths of each data structure and the time complexities for its various operations.

Loading…
Cancel
Save