Grokking Data Structures & Algorithms for Coding Interviews
Ask Author
Back to course home

0% completed

Vote For New Content
Extended test case has wrong solution

traviswlilleberg

Oct 30, 2025

When I run my code against the extended test cases I get a failure on the first test, [4,2,6,1,3,5,7].

It says expected is 4 for that answer, however the instructions state to use the smaller number so the expected should be 3.

Here's the output verbatim:

[4,2,6,1,3,5,7]

3.5

[8,3,10,1,6,null,14]

4.4

[5,3,8,1,4,6,9]

7.4

Output

3

3

8

Expected

4

3

8

0

0

Comments
Comments