DEV Community

Discussion on: What Crazy Idea Actually Worked?

Collapse
 
citronbrick profile image
CitronBrick

I had a chapter on randomized algorithms in college.
Some months back, did a challenge on how to fill a grid in a certain way.
Tried to generate possible solutions, by filling a 2 dimensional array with
random numbers, using JS & then check if it fulfills the conditions.
I had thought it would take a long time, but it was generating solutions, within minutes !!
I was completely surprised that it worked.