This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple script to scrape data from http://bigocheatsheet.com/ | |
import requests | |
from bs4 import BeautifulSoup | |
page = requests.get('http://bigocheatsheet.com/') | |
soup = BeautifulSoup(page.text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name | Indexing (Average) | Search (Average) | Insertion (Average) | Deletion (Worst) | Indexing (Worst) | Search (Worst) | Insertion (Worst) | Deletion (Worst) | Space | |
---|---|---|---|---|---|---|---|---|---|---|
Basic Array | O(1) | O(n) | Undefined | Undefined | O(1) | O(n) | Undefined | Undefined | O(n) | |
Dynamic Array | O(1) | O(n) | O(n) | O(n) | O(1) | O(n) | O(n) | O(n) | O(n) | |
Singly-Linked List | O(n) | O(n) | O(1) | O(1) | O(n) | O(n) | O(1) | O(1) | O(n) | |
Doubly-Linked List | O(n) | O(n) | O(1) | O(1) | O(n) | O(n) | O(1) | O(1) | O(n) | |
Skip List | O(log(n)) | O(log(n)) | O(log(n)) | O(log(n)) | O(n) | O(n) | O(n) | O(n) | O(n log(n)) | |
Hash Table | Undefined | O(1) | O(1) | O(1) | Undefined | O(n) | O(n) | O(n) | O(n) | |
Binary Search Tree | O(log(n)) | O(log(n)) | O(log(n)) | O(log(n)) | O(n) | O(n) | O(n) | O(n) | O(n) | |
Cartresian Tree | Undefined | O(log(n)) | O(log(n)) | O(log(n)) | Undefined | O(n) | O(n) | O(n) | O(n) | |
B-Tree | O(log(n)) | O(log(n)) | O(log(n)) | O(log(n)) | O(log(n)) | O(log(n)) | O(log(n)) | O(log(n)) | O(n) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
welcome! |