Two Sum - Leetcode 1 - HashMap - JavaScript

preview_player
Показать описание

0:00 - LeetCode Interview Question #1 Two Sum
0:44 - How to Approach the Problem
2:00 - Coding Brute Force Solution
2:55 - Testing & Submitting to Leetcode
3:30 - Optimizing Our Solution
5:10 - Coding Our Optimal Solution
7:10 - Testing Our Optimal Solution & Space and Time Complexity

In this leetcode video tutorial lets solve leetcode problem #1 two sum in javascript. It is a very common coding interview question at amazon. This video contains brute force / logical solution and as well as optimal / efficient solution. We will be using arrays and hashmap also sometimes known as hashtables.

#javascript #hashmap #CodingInterview
Рекомендации по теме
Комментарии
Автор

I love the new content style. Very informative and on the point.

TechWithHamoon
Автор

without using a hash map, and using the js array.sort method and a while loop you can improve the time complexity to be O(nlog(N) and space complexity to O(1)

callipygian
welcome to shbcf.ru