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

GOOGLE - COUNT PRIMES (LeetCode)

This is one of Google's most commonly asked interview questions according to LeetCode (2019)! Count Primes coding solution. If you give me 5 minutes you'll thank me if this appears during your Google interview! Coding Interviews Count Primes (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: Google, Microsoft, Apple, and Adobe.

Link to problem: https://leetcode.com/problems/count-primes/

Intuition behind solution: Initially consider all numbers as prime. Continuously iterate through numbers 2 - n and if the current number is prime, iterate through all numbers from the current number, i, up to i * i marking multiples of that numbers as not prime. Once the outer loop terminates, count the number of remaining true values in the array as though are the number of prime numbers.

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
----------------------------------------------------------------------------------------------------------------
rip roach by andy*
https://soundcloud.com/user-368717228/rip-x

#coding #interviews #softwareengineering

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

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

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

Зарегистрируйтесь или войдите с
Информация о видео
2 мая 2019 г. 8:13:59
00:06:46
Яндекс.Метрика