filmov
tv
LeetCode Solution 1. I Cracked the Two Sum Problem in 30 Minutes!
Показать описание
Problem Statement:
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
You can return the answer in any order.
Problem Link:
0:00 - Brute Force(Theory)
7:05 - Brute Force(Solution)
9:00 - Using HashMap(Theory)
14:38 - Using HashMap(Solution)
Source Code:
leetcode 1
#java #hashmap #CodingInterview #leetcode #leetcodesolution
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
You can return the answer in any order.
Problem Link:
0:00 - Brute Force(Theory)
7:05 - Brute Force(Solution)
9:00 - Using HashMap(Theory)
14:38 - Using HashMap(Solution)
Source Code:
leetcode 1
#java #hashmap #CodingInterview #leetcode #leetcodesolution