- Insertion: O(1) // always inserting at beginning (constant time)
- Deletion: O(1) // always deleting at beginning (constant time)
- Searching: O(n) // will have to search n/2 on average (n = # of items in linked list) (linear time)
- O(n) time | O(n) space
- If you want to see the code under LinkedListApp, open the src/LinkedListApp.java file
- PS: (Don't worry about the other files located in /src. Those were created upon initial compilation)
- There are two ways to run the app in VSCode:
- 1). Running in the CLI
- 2). Running within the 'main' method
- IMPORTANT: I've compiled the java program prior to uploading to GitHub, so no need to compile (check /bin/)
- To run in CLI, open the CLI (Windows/macOS/Unix: Ctrl + `) and change directory to LinkedList/src
- Enter 'java LinkedListApp'
- Expand 'src' directory on left-hand side
- Click LinkedListApp.java
- Scroll down to the last (main) class (LinkedListApp)
- Click 'Run' above the main method (appears as 'Run | Debug')
- Recommendations factor in ease-of-use as well as future-proofing.
- Running applications through CLI has been the same for years already, so it will likely stay the same for years to come
- Running applications through VSCode GUI depends on the version of the users application. Our versions might not match. Becasue of this, I've deemed this method unreliable