Daily Dose of LeetCode: Kth Largest Element in a Stream

Поділитися
Вставка
  • Опубліковано 9 чер 2024
  • Hello everyone, this is YOUR Daily Dose of LeetCode
    In this video, we're tackling the Kth Largest Element in a Stream problem. We'll not only discuss the key insights but also explore the optimal possible runtime, and dive into both brute force and optimized solutions.
    Remember to like, comment, and subscribe to stay updated with our LeetCode problem-solving guides, and drop a comment if you have any other problems you'd like me to solve.
    // TIMESTAMPS //
    00:00 - Intro
    00:15 - The problem in simple terms
    00:39 - What are the key takeways?
    01:10 - Brute Force Solution
    02:30 - Optimized Solution
    // SOCIALS //
    Twitter: / thecodingsloth1
    TikTok: / thecodingsloth
    #leetcode #python #codinginterview #algorithm #programming #codingtutorials #computerscience

КОМЕНТАРІ • 5

  • @yurt-page
    @yurt-page 9 місяців тому +2

    2:16 complexity of constructor is O(1) - it doesn't matter how many elements we just save them without any iteration

  • @official_mosfet
    @official_mosfet 9 місяців тому +2

    Your content is sooo underrated.

  • @thoopra
    @thoopra 7 місяців тому

    Genius

  • @Levy957
    @Levy957 8 місяців тому

    in python:
    return sorted(nums)[-k]

  • @worldExplorer__
    @worldExplorer__ 5 місяців тому

    I've an interview tomorrow...and can't come up with that optimised approach🫥