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

0% completed

Vote For New Content

I think that it's not a hard problem.

lejafilip

Jul 27, 2024

5

43

0

Oct 3, 2025

Alternate C++ Solution - keep track of zeros

Roberto Pantoja

Jun 15, 2023

0

32

2

Oct 2, 2024

Not sure if my solution is O(N) or O(N^2) with the inner while loop. I thought f...

Anthony DiFede

Nov 14, 2022

0

17

0

Nov 16, 2022

from collections import Counter class Solution: def longestOnes(self, nums: L...

Austin McDaniel

Nov 4, 2022

0

6

0

Nov 4, 2022

For the previous problem, we kept track of the *maximum* count of a single lette...

Pete Stenger

Aug 9, 2022

2

24

0

Aug 9, 2022

I got a similar solution to Max's. The only difference is that I kept counters f...

Clodoaldo Favaro

Jul 15, 2022

0

20

0

Jul 15, 2022

keep track of the count of 0s

Max

Jul 8, 2022

6

30

0

Jan 30, 2025

Is there a specific reason why we didn't decrement max_repeat_letter_count in th...

Richard Yuan

Apr 27, 2022

1

10

2

Apr 16, 2024

I keep going through these sliding window problems and can't really seem to spot...

Perry Robinson

Mar 4, 2022

2

17

1

Mar 9, 2022

Shouldn't we need to use a while loop to see if the window has become invalid ra...

Alex

Mar 1, 2022

1

14

1

Jun 12, 2023

It's more intuitive for me to keep track of the count of 0s instead. The conditi...

SeungJin Kim

Feb 27, 2022

4

27

1

Jun 12, 2023

maxOnesCount does not keep track of the maximum number of repeating 1s in the cu...

Mikhail Putilov

Feb 16, 2022

7

21

0

Feb 16, 2022