Add Two Numbers | LeetCode 2
AFFILIATE LINKS Great resource I use to learn algorithms.40% off Tech Interview Pro: http://techinterviewpro.com/terriblewhiteboard20% off CoderPro: http://coderpro.com/terriblewhiteboard
AFFILIATE LINKS Great resource I use to learn algorithms.40% off Tech Interview Pro: http://techinterviewpro.com/terriblewhiteboard20% off CoderPro: http://coderpro.com/terriblewhiteboard
AFFILIATE LINKS Great resource I use to learn algorithms.40% off Tech Interview Pro: http://techinterviewpro.com/terriblewhiteboard20% off CoderPro: http://coderpro.com/terriblewhiteboard
AFFILIATE LINKS Great resource I use to learn algorithms.40% off Tech Interview Pro: http://techinterviewpro.com/terriblewhiteboard20% off CoderPro: http://coderpro.com/terriblewhiteboard
The key to this is realizing that to get to test if you can get to a target index from the current index, you can add the current index to its value. For instance, if index 3 has the value of 5, you add 3 and 5, which gives you 8. If your target index …
The key to understanding this problem is this. You need an array that will keep track of the possible sums you can get by adding the numbers in the nums array in various ways. For example, if the nums array is [1, 2, 3], the combination sum array will be [true, true, true, true, true, …
AFFILIATE LINKS Great resource I use to learn algorithms.40% off Tech Interview Pro: http://techinterviewpro.com/terriblewhiteboard20% off CoderPro: http://coderpro.com/terriblewhiteboard In this problem, we add each number to a set in order to remove any duplicate values. Then, we loop over the set only. To be the most efficient, we should only check the length of the streak once for …
AFFILIATE LINKS Great resource I use to learn algorithms.40% off Tech Interview Pro: http://techinterviewpro.com/terriblewhiteboard20% off CoderPro: http://coderpro.com/terriblewhiteboard The way we’ll solve this is using the sliding window technique. For this, we need a set and two pointers. The pointers keep track of the “window”. For example, if the left pointer is at index 1 and the right …
Longest Substring Without Repeating Characters | LeetCode 3 Read More »
AFFILIATE LINKS Great resource I use to learn algorithms.40% off Tech Interview Pro: http://techinterviewpro.com/terriblewhiteboard20% off CoderPro: http://coderpro.com/terriblewhiteboard Here is the full implementation.
AFFILIATE LINKS Great resource I use to learn algorithms.40% off Tech Interview Pro: http://techinterviewpro.com/terriblewhiteboard20% off CoderPro: http://coderpro.com/terriblewhiteboard Here is the full implementation.
AFFILIATE LINKS Great resource I use to learn algorithms.40% off Tech Interview Pro: http://techinterviewpro.com/terriblewhiteboard20% off CoderPro: http://coderpro.com/terriblewhiteboard Here is the full implementation.