Загрузка страницы

AMAZON CODING INTERVIEW QUESTION - COMBINATION SUM II (LeetCode)

This is one of Amazon's most commonly asked interview questions according to LeetCode (2019)! Combination Sum II coding solution. If you give me 10 minutes you'll thank me if this appears during your Amazon interview! Coding Interviews Combination Sum II (LeetCode) question and explanation.

DISCORD CHANNEL
----------------------------------------------------------------------------------------------------------------
To join the Discord channel use the following link and join the "Member" tier: https://www.patreon.com/KevinNaughtonJr
In this Discord channel, you will be able to...
1. Ask me questions directly (as well as other members)
2. Ask about and discuss previous interview experiences
3. Find mock interview partners
4. Share helpful videos for interview preparation, and more!

This question is commonly asked by the following companies: Amazon, Microsoft, and Uber.

Link to problem: https://leetcode.com/problems/combination-sum-ii/

Intuition behind solution: Sort our numbers and call a recursive function to generate all unique combinations. In each recursive call, check if our target is 0, if it is, add the combination to our return value, if our target is less than 0 return, otherwise, simulate taking and not taking the remaining of elements in candidates by iterating through the rest of the numbers, adding the current number to our current list and calling our function recursively with the new target (target - candidates[i]) and then remove the last number we added (to simulate not taking the current number). Once the top level call returns, return our result.
My Desk Setup
Desk - https://bit.ly/3jfY195
Chair - https://amzn.to/2O9TM3r
Monitor - https://amzn.to/3rcSHGa
Webcam - https://amzn.to/2NUmwgi
Desktop - https://amzn.to/3tiySPL
Laptops - https://amzn.to/3aRoN3Z
iPad - https://amzn.to/2LlJzzJ
Keyboard - https://amzn.to/3jfbxdd
Mouse - https://amzn.to/36ElWtT
Wrist Rest - https://amzn.to/3trrHF4 (pls don't buy this)
Mouse Pad - https://amzn.to/2Myz2lt
Microphone - https://amzn.to/3atNyTA
Lamp - https://amzn.to/3jjfZYp
Headphones - https://amzn.to/3tvr0KU (new model)
Headphone Hook - https://amzn.to/3tr8uTC
Blue Light Glasses - https://amzn.to/3cDVUdK
Wireless Charger - https://amzn.to/39LY1uu
Keyboard cable - https://amzn.to/2O5p2R5
Mic arm - https://amzn.to/3cECZj8
Audio interface - https://amzn.to/36HdWIi
Cloudlifter - https://amzn.to/36VO6kf
Laptop dock - https://amzn.to/2O2DsBw
Motherboard - https://amzn.to/3rkiWuA
Solid state - https://amzn.to/3rk5vuo
CPU cooler - https://amzn.to/3tnwwPA
CableMod - https://amzn.to/3tqbtM8
CPU - https://amzn.to/3auG1ns
Power supply - https://amzn.to/3trsAxo
RAM - https://amzn.to/39JZcuf
Designing Data-Intensive Applications - https://amzn.to/2YK4ek1
Clean Code - https://amzn.to/3txqfB5
Meditations - https://amzn.to/3cDa4fi

SOCIAL
----------------------------------------------------------------------------------------------------------------
Support me on Patreon: https://www.patreon.com/KevinNaughtonJr
Follow me on Twitter: https://twitter.com/KevinNaughtonJr
Follow me on Instagram: https://instagram.com/kevinnaughtonjr/
Follow me on GitHub: https://github.com/kdn251

MUSIC
----------------------------------------------------------------------------------------------------------------
Oh I Think They Like Me by MAJORA✰
https://soundcloud.com/uwumajora/oh-i-think-they-like-me

#coding #interviews #softwareengineering

Видео AMAZON CODING INTERVIEW QUESTION - COMBINATION SUM II (LeetCode) канала Kevin Naughton Jr.
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
8 мая 2019 г. 7:27:11
00:10:59
Яндекс.Метрика