https://github.com/chlohal/csci-160-quiz-07
https://github.com/chlohal/csci-160-quiz-07
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/chlohal/csci-160-quiz-07
- Owner: chlohal
- Created: 2023-11-10T17:51:35.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-10T18:13:15.000Z (over 1 year ago)
- Last Synced: 2025-01-27T23:18:00.670Z (5 months ago)
- Language: Java
- Size: 368 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Question 1: Insertion
### Time Complexity
This algorithm has a worst-case time complexity of $O(n^2)$, since it uses two nested `for` loops over the array.
### Space Complexity
This algorithm has an auxillary space complexity of $O(1)$, since it uses only 2 variables (besides loop counters), both of which are primitive integers.