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

0% completed

Vote For New Content
Venkatesh Vinayakarao
Would the answer be always an array in ascending order from 1 to n?

Venkatesh Vinayakarao

Dec 11, 2024

I am struggling to find an example where that would not be the case. In fact, a solution that simply returns the nums array set to 1 .. n is accepted as correct. Are duplicate numbers allowed?

0

0

Comments
Comments
G
gentlerainsky a month ago

The solution is always 1...n. This problem is just for practicing implementing the pattern.

On this page