SSidincodingbasics.hashnode.dev·Jan 24, 2021 · 3 min readBasics Sorting Algorithm: MergeSort (Python)MergeSort splits an array into halves which takes log(n) time and then takes n operations to sort the entire list when we are merging it back after breaking the halves down. Therefore, it has a complexity of O(n log(n)) How it works: Take array, arr ...00
SSidincodingbasics.hashnode.dev·Jan 16, 2021 · 3 min readBasics Sorting Algorithm: BubbleSort (Python)BubbleSort uses nested for loops in order to sort an array and therefore has a time complexity of O(n^2). That is slow, but it is still an important algorithm to know. How it works: Take array, arr = [54, 26, 93, 17, 77, 31, 44, 55, 20] size, n = 9 B...00
SSidincodingbasics.hashnode.dev·Dec 12, 2020 · 4 min readBasics Data Structures: Linked List (Python)What is a Linked List ? A linked list can be visualized as below: If you look at the image provided above: You can see there are 4 Nodes (or cell), each with a partition in it: The first partition represents data (A, B, C or you could store number...00