4 ms·
I actually tried doing it myself using JS and I ran into a lot of problems.. Excellent. Keep trying until you succeed. In the interest of giving practical advi
by lopatin 10y ago
I actually tried doing it myself using JS and I ran into a lot of problems..
Excellent. Keep trying until you succeed. In the interest of giving practical advice instead of hand waving, I'll just say that the n-queens link you provided is something that I would expect a good JS developer to build in, say .. a day. You will get there, and it's OK if for now it takes you way longer. "one day" is provided, of course, that I'm not being naive about what the implementation requires. Currently I think it is a collection of JS implementations of algorithms for which the pseudocode can be found on Wikipedia + a simple simulator that runs said algorithms one iteration at a time. (Interesting that the speed can be edited. I guess that rules out setInterval) Let me know if I presumed too much :) Definitely do it for fun, practice, confidence, github, etc... but I wouldn't make it the first thing on a resume unless there's something novel going on there.
Try this: Find a thing and make it faster. Like way faster. Often, there is some operation (F) that is called many times on some type of object (X) and it's possible (perhaps using linear algebra) to improve performance by figuring out a way to express many operations on single items into one operation on many items. I.e. F([X1, X2, X3, ...]) instead of F(X1), then F(X2), then F(X3), ... and so on.