Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Structure #18

Open
jimin-kiim opened this issue Jun 26, 2023 · 2 comments
Open

Data Structure #18

jimin-kiim opened this issue Jun 26, 2023 · 2 comments

Comments

@jimin-kiim
Copy link
Owner

No description provided.

@jimin-kiim
Copy link
Owner Author

jimin-kiim commented Jul 5, 2023

Array

  • TC using/modifying the value of k-th element : O(1)
  • TC inserting/removing the value of arbitrary element : O(N)
  • overhead is almost nonexistent
  • high cache hit rate

@jimin-kiim
Copy link
Owner Author

jimin-kiim commented Jul 5, 2023

Linked List

  • TC using/modifying the value of k-th element : O(k)
  • TC inserting/removing the value of arbitrary element : O(1)
  • overhead: O(N)
  • low cache hit rate

Sorts of Linked Lists

  • Singly Linked List
    • holding address for the next one
  • Doubly Linked List
    • holding addresses for both the next and the previous ones
    • STL list or by hand
  • Circular Linked List
    • last node holds the address of the first one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant