Grokking the Engineering Manager Coding Interview
Ask Author
Back to course home

0% completed

Vote For New Content

Dear authors...Why are the sample solutions so unwieldly hard to read?

Luis Roel

Dec 10, 2024

0

24

0

Jul 20, 2025

My solution

Mohammed Dh Abbas

Jul 9, 2024

0

28

0

Jul 9, 2024

Using Object.keys() for iterating increases time complexity

Ariel Davies

Jun 3, 2024

2

19

0

Mar 18, 2025

Soloution is buggy

arya.javadi80

Aug 14, 2023

0

61

1

Aug 16, 2023

use set instead of hashMap

Rohit Sharma

Jul 2, 2023

0

69

0

Jul 2, 2023

This is one that is causing me a lot of trouble https://leetcode.com/problems/sl...

Sourav Rawat

Dec 13, 2022

1

56

1

Mar 20, 2025

I didn't really get the window " In the current window, ...." . Can anyone expl...

Ngân Nguyễn

Dec 7, 2022

0

20

1

Jan 1, 2023

I believe I accounted for the edge cases...As long as you encounter a letter you...

Anthony DiFede

Nov 12, 2022

1

13

0

Nov 12, 2022

Can someone give me some feedback on this?

Anthony DiFede

Nov 11, 2022

0

16

1

Nov 12, 2022

As discussed below here is the solution similar to that in example but with if i...

Viacheslav Lushchinskiy

Oct 27, 2022

0

16

2

Oct 27, 2022

I would like add two point. 1. The while loop is not necessary, because we are ...

Viacheslav Lushchinskiy

Oct 25, 2022

0

22

4

Oct 27, 2022

Can someone clarify this line: maxLength = Math.max(maxLength, windowEnd ...

Godspeed

Sep 29, 2022

0

6

1

Oct 2, 2022

Why not use Sliding Window + Ordered Dictionary?

Mohammad Khan

Sep 20, 2022

0

9

0

Sep 20, 2022

"aabccbbdef" is a good example that will trigger the edge case. As mentioned by ...

Bharpur Singh

Sep 10, 2022

0

16

0

Sep 10, 2022

A less tricky solution would be to check if the frequency of the current charact...

Clodoaldo Favaro

Sep 8, 2022

0

10

0

Sep 8, 2022

how about this solution, basically once we encounter a duplicate then just clea...

ag

Sep 6, 2022

2

11

1

Jun 29, 2023

Hello, is the hashmap even needed? Can't you just get the first character in the...

Juan Garcia

Aug 8, 2022

0

6

0

Aug 8, 2022

Out of curiosity, why is the time complexity O(N) and not O(N*K)

Rodney

Aug 1, 2022

1

12

2

Nov 2, 2022

Anything wrong with this solution? Thanksstatic int longestSubstring(String inpu...

Sukumar

Jul 1, 2022

0

4

2

Dec 28, 2022

Hi, For "Longest Substring with K Distinct Characters" question, curious to kno...

Sukumar

Jun 30, 2022

0

2

2

Jul 13, 2022

Why is right_char frequency initialized to 0 as we add it to the char_frequency ...

Dale

May 18, 2022

0

1

2

Jun 29, 2022

Does anybody have an edge case where you need to set windowStart like thiswindow...

Joshua Causey

Mar 22, 2022

1

1

1

Jul 2, 2022

Why do we need to delete the leftCharacter once its frequency reaches 0?

florian.vogt

Mar 18, 2022

0

3

6

Jun 23, 2022

windowStart = Math.max(windowStart, charIndexMap.get(rightChar) + 1);Any...

Pratik

Feb 28, 2022

2

9

3

Sep 10, 2022

An implementation in golang based on maintaining character count instead of char...

Bipra

Feb 7, 2022

0

5

1

Oct 11, 2022

A simple implementation using Arrays instead of hashmap. It uses a fixed size a...

Syed Hassan

Jan 14, 2022

0

8

2

Sep 16, 2022

Its bit difficult to my head get around this implementation since in the previou...

Nikhil Srivastava

Jan 12, 2022

6

36

3

Aug 4, 2023

Why can't you insert rightChar into the map first and then update widowStart, su...

Yogi Paturu

Dec 18, 2021

0

9

3

Dec 7, 2022