Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Their are multiple answers
Brute force midnight coding FTW!!!!
https://thepasteb.in/p/...
If people want me to comment my code say so and I will do it tomorrow -
@D0nu7 Your right I didn't implement 4 correctly, I forgot that they were not order sensitive.
https://thepasteb.in/p/... -
@Hobgoblin101 You forgot to exclude the cases where a number has a wrong place.
For example, hint #5 states that the last position for 0 is explicitly wrong. Ergo, you can't use a number in the same position it was found if the hint states the pos is wrong.
So for ordered = false, add something like AND !(arr[i] === search[i]) -
@Hobgoblin101 @sebastian
Sebastian is correct, if you consider this the only viable result would be 042 -
@D0nu7 @sanse1992 Quite afew bad implementation, but still pretty good for a last minuet midnight coding before I fell asleep at my desk
-
I figured out 0 for the first one and nothing after that. When I saw that there were multiple wrong answers, I quit figuring out how the right answer is how. Saying "find THE code" makes it hard to figure out if there are 3, if you are under the assumption that only 1 can be correct
-
I am sure that I am right now.
I have slept, had a shower, ate breakfast, and started from scratch with an awake mind.
This should work for any and all puzzles like this one.
https://thepasteb.in/p/... -
For anyone who wanted more you could try this (it's a similar problem) > https://cgi.cse.unsw.edu.au/~progco...
Try jogging your mind...
undefined