2022-05-01
class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next Draw It out! To solve the linked list problems, the most important thing is to draw the linked list and the procedure out.
2021-04-15
Hash Table The Hash table data structure stores elements in key-value pairs where Key - unique integer that is used for indexing the values Value - data that are associated with keys.
2021-04-08
TL;DR Array Linked List Store in memory Elements are stored in contiguous locations in memory. Elements can be stored anywhere in memory Size Fixed, must be specified at the time of initialization Changeable, can grow/shrink by insertion/deletion Access element Random access
2021-04-05
Get Dictionary Items with Specified Initialization dict.get(key, default = None)) returns the value of the item with the specified key. Parameters key โ This is the Key to be searched in the dictionary.
2020-07-08
Change Value in List Based on Conditions E.g. 1 >>> a = ["a", "b", "c", "d", "e"] >>> b = ["a", "c", "e"] We want a list vector with the same length as a.
2020-07-08