CtCI-6th-Edition-JavaScript icon indicating copy to clipboard operation
CtCI-6th-Edition-JavaScript copied to clipboard

Update ch1-q1?

Open abohannon opened this issue 6 years ago • 1 comments

Would it make sense to change the params for the solutions to take a string rather than an array? I was thrown off by the use of sort in the second solution until I realized the "str" variable was actually an array.

The problem in the book clearly requests an implementation of an algorithm that works on a string. I suppose this is something the candidate could/should check before hand so I can understand reasoning for leaving it in.

abohannon avatar May 24 '18 22:05 abohannon

Hi @abohannon, sorry for replying so late, I just came across this repo!

Are you referring to this file ? (Note, this link is the isUnique.js file that was committed on Aug 5, 2019).

The latest version of this file looks like this

In both commits, the params appear to be Strings... is there something that I am missing?

dsomel21 avatar Jul 12 '20 01:07 dsomel21