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

0% completed

Vote For New Content

Clearer problem description (No solution/spoiler)

Rudy Peralta

Jun 9, 2025

3

23

0

Nov 8, 2025

Error running your solution with test cases

sw94070

Mar 26, 2025

0

8

0

Mar 26, 2025

My Solution with explanation

Mohammed Dh Abbas

Jun 24, 2024

0

69

0

Jun 24, 2024

3 Pointer solution I found on youtube

Nirbhay Lourembam

Jun 14, 2023

2

91

1

Mar 27, 2024

3 pointers?

krishnakeshav.pes

Jun 11, 2023

2

73

0

Jan 19, 2025

Lack of visual explanation for these problems continues to be a point of content...

CaptainKidd

Jan 10, 2023

6

90

1

Sep 3, 2025

it would help if the solution is explained visually

Smoke

Dec 13, 2022

5

49

0

Aug 16, 2023

this solution doesn't work on leetcode.error is it cannot find the symbol for th...

Bryan Pena

Aug 31, 2022

0

38

0

Aug 31, 2022

Could I not push each element to a hashmap and then just concat it?{ 0: [0,0], ...

Eduardo Sánchez

Apr 5, 2022

1

54

2

Jun 4, 2022

On this page

Problem Statement

Examples

Example 2

Try it yourself