Software Engineer Mock Interview: 3 Sum Algorithm Problem

  Рет қаралды 9,520

Exponent

Exponent

Күн бұрын

Пікірлер: 4
@tryexponent
@tryexponent 2 жыл бұрын
Don't leave your software engineering career path to chance. Make sure you're interview-ready with Exponent's software developer interview prep course. Start free. bit.ly/3iOyWCy
@yanciliang7735
@yanciliang7735 3 күн бұрын
Thanks for providing such a great example! I recently completed the 2-sum problem and was excited to quickly find the approach of assuming one element as part of the target combination. This simplifies the problem into a 2-sum problem. It’s also fun to consider how the optimal solution shifts when the problem evolves from 2-sum to 3-sum. For instance, hashing, which offers O(n) time complexity for 2-sum, is no longer the best choice for 3-sum because we inevitably need at least O(n²) time due to the additional loop. This makes the pointer-based approach, with its O(n log n) sorting overhead, more feasible and efficient. It’s intriguing to see how the nature of the problem changes the optimal solution.
@ruspatel1996
@ruspatel1996 2 жыл бұрын
Great work! I love how you worked from a naive solution to solving a smaller problem (2 sum) to applying the solution of the smaller problem to a larger problem. Also great work on showing why sorted/pointer method was better than hash set method.
@MelonHusk7
@MelonHusk7 2 жыл бұрын
Thank you!
Leetcode Target Sum Solution by Flipkart Software Engineer
34:15
Google Coding Mock Interview: Buddy Strings
25:41
Exponent
Рет қаралды 6 М.
風船をキャッチしろ!🎈 Balloon catch Challenges
00:57
はじめしゃちょー(hajime)
Рет қаралды 84 МЛН
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 2,3 МЛН
How Much Tape To Stop A Lamborghini?
00:15
MrBeast
Рет қаралды 200 МЛН
HELP!!!
00:46
Natan por Aí
Рет қаралды 71 МЛН
Indistinguishability Obfuscation with Sora Suegami
1:09:52
Signature Singularity Residency
Рет қаралды 11
How To Pass Technical Interviews When You Suck At LeetCode
14:32
Google Coding Mock Interview: Chess N-Queens problem
29:19
Exponent
Рет қаралды 5 М.
Whiteboard Coding Interviews: 6 Steps to Solve Any Problem
15:18
Fullstack Academy
Рет қаралды 377 М.
I Asked Googlers How To Get Hired
9:44
Namanh Kapur
Рет қаралды 1,6 МЛН
7 Years of Software Engineering Advice in 18 Minutes
18:32
風船をキャッチしろ!🎈 Balloon catch Challenges
00:57
はじめしゃちょー(hajime)
Рет қаралды 84 МЛН