How I will Leetcode and review next weekI have been doing Leetcode on-and-off lately. "On" for most days. "Off" when I have an exam or, lately, feel not in good health. I know this is not a recommended schedule, so I want to incorporate a system to learn and review. Set up: Focus on 75 B...Jul 30, 2021 Ā· 2 min readcup-of-coding.hashnode.dev
Operations on Arrays and their time complexityAbove, I attached a table of common data structure operations from Big-O cheat sheet . And we will focus on Array for now. As you can see, there are four operations to take notice of. Those are access, search, insertion, and deletion. With each of ...Jul 4, 2021 Ā· 3 min readcup-of-coding.hashnode.dev
Explaining O(n) and O(1)O(n) vs O(1) When we say an algorithm is O(n), we imply that it takes n steps to take this algorithm from start to finish, given n is the number of input, or in the array case, the length of an array. For example, let's look at the following code sn...1MJun 29, 2021 Ā· 2 min readcup-of-coding.hashnode.dev
Library books, or are we talking "Arrays"?Imagine you are in a library, facing rows of bookshelves. Each bookshelf is stacked with rows and rows of books covering many topicsāHistory, Astronomy, Biography, and Literatureālike this one I got from Google: Because the libraries have to handle ...Jun 24, 2021 Ā· 4 min readcup-of-coding.hashnode.dev