Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content

O(N) pqueue python implementation

Pete Stenger

Oct 27, 2024

0

10

1

Oct 27, 2024

Priority queue isn't accepted at interview. You have to provide O(N).

lejafilip

Oct 17, 2024

0

18

0

Oct 17, 2024

Simpler time complexity

Tobby Lie

Sep 23, 2024

0

8

1

Oct 27, 2024

Sorting based solution in O(NlogN)

Rishabh Shukla

Mar 27, 2024

0

18

1

Mar 27, 2024

Possible Incorrect Implementation

Josh Osborne

Feb 16, 2024

0

16

0

Feb 16, 2024

Can't it be done in O(N) ?

Utkarsh Gupta

Aug 22, 2023

0

37

1

Aug 22, 2023

There's a typo in the Python solution here: `previousFrequency = frequency + 1` ...

Rishik Lad

Sep 12, 2022

0

24

1

Sep 12, 2022

hi

NEHA GUPTA

May 24, 2022

0

25

0

May 24, 2022