Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Terrible LeetCode in Kotlin:

  • Personal Finance with Raymond
  • 2022-08-23
  • 61
Terrible LeetCode in Kotlin:
  • ok logo

Скачать Terrible LeetCode in Kotlin: бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Terrible LeetCode in Kotlin: или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Terrible LeetCode in Kotlin: бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Terrible LeetCode in Kotlin:

Another day, another LeetCode question (for now). Today, I'm running through #692 Top K Frequent Words. The problem provides a list of strings and an integer k, with the output being a list of size k of the top k frequent words from the original list.

The first thing that came to mind was using a heap, and that's what I ended up using to solve this problem. I started by mapping the strings into a frequency map, then added each string into the heap by their frequency. We can then pop out these elements. This results in a runtime of O(n) + O(klogk), where n is the number of elements within our original list and k are the number of unique strings within our list. We also take up somewhere in the order of O(k) space because we need to store the unique entries within our list.

To address the ordering of words which have the same frequency, we introduce an additional constraint within our class, where if the two objects have the same frequency, then we simply compare their strings. This allows us to pop elements from the heap while considering the lexicographical ordering on insertion.

I work in Kotlin as my LeetCode programming language because my current focus is on Android app development. Kotlin is interoperable with Java, so the solution should be relatively similar albeit with some more boilerplate checks for nulls and such.

Current Grind:
Grind75 list, 22 weeks/16 hours per week, [92/169]
(https://www.techinterviewhandbook.org...)

Chapters:
00:00 - Problem discussion, coding begins
06:26 - Coding Begins (Heaps)

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]