Operations Per Second: Most competitive programming platforms allow approximately 10^8 operations per second. Some may allow 10^7 operations. Generally, if your algorithm's complexity results in operations exceeding 2^27 (which is approximately 134,217,728), it is likely to cause TLE in a 1-second time frame.
- O(1): Acceptable for tiny inputs.
- O(logN): Acceptable for inputs up to 10^9
- O(N): Acceptable for N up to 10^8
- O(NlogN): Acceptable for N up to 10^5
- O(N^2): Acceptable for N up to 10^4
- O(N^3): Acceptable for N up to 10^2
- O(2^N) and O(N!): This is considered a relatively small value, and algorithms with a time complexity of O(2^N) where n≤10 are often accepted.Generally not acceptable for any significant input size due to their rapid growth.
- resources
- prerequisites
- math
- arrays
- hashing
- two pointers
- sliding window
- binary search
- strings
- linked list
- recursion
- stack
- queue
- heap/priority queue
- bit manipulation
- prime
- greedy
- dynamic programming
- meet in the middle
- binary tree
- binary search tree
- graph
- segment tree
- fenwick tree/binary indexed tree
- tries
- problem series