Leetcode and data structures

New
DLOA42

New

DLOA42
Sep 16, 2021 12 Comments

For people that saying "I studied/coded basic data structures and it was enough or passed the interviews", can you please explain me how just understanding/studied/implementing a heap can help you with solving the "find the median from a data stream" problem? #leetcode

comments

Want to comment? LOG IN or SIGN UP
TOP 12 Comments
  • Cisco
    Yolok

    Go to company page Cisco

    Yolok
    No one can solve it seeing first time in the interview, relax
    Sep 16, 2021 7
  • The reason behind learning/understanding data structures is like learning characters/words in a language so that you could express yourself in a written language to others without mistakes. Knowing data structures can only take you so far, one should be able to compose/orchestrate them properly to build higher order data structures/functionality. Knowing words/vocabulary is necessary but not sufficient to acquire writing skills. Similarly , data structures which are fundamental building blocks are necessary but not sufficient to master programming.
    Sep 16, 2021 0
  • Amazon
    rigbyk

    Go to company page Amazon

    rigbyk
    I think your problem is that you’re using a stack for this problem
    Sep 16, 2021 1
    • New
      DLOA42

      New

      DLOA42
      OP
      you are right, I meant heap
      Sep 16, 2021
  • Coinbase / IT
    monkahmm

    Go to company page Coinbase IT

    monkahmm
    >> learn git
    >> git gud
    Ez
    Sep 16, 2021 0