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

GOOGLE - NEXT CLOSEST TIME (LeetCode)

Next Closest Time LeetCode coding solution. This is one of Google's most commonly asked interview question according to LeetCode! If you give me 10 minutes you'll thank me if this appears during your interview! Coding Interviews Next Closest Time (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 a commonly asked by the following companies: Google.

Link to problem: https://leetcode.com/problems/next-closest-time/

Intuition behind solution: Change time to be represented as minutes. Add to a hash set all the digits you have available. While you have no found the next closest time add one to the minutes. Change the minutes back to the representation we started with checking if each of the digits exist in our digits hash set. If they all exist return the formatted time, otherwise continue generating times.

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

MUSIC
----------------------------------------------------------------------------------------------------------------
Blushes by Dj Quads
https://soundcloud.com/aka-dj-quads/blushes

#coding #interviews #softwareengineering

Видео GOOGLE - NEXT CLOSEST TIME (LeetCode) канала Kevin Naughton Jr.
Показать
Комментарии отсутствуют
Введите заголовок:

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

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

Зарегистрируйтесь или войдите с
Информация о видео
12 марта 2019 г. 8:00:41
00:08:47
Яндекс.Метрика