Did this in Python. There was pretty much only one way I could imagine a recursive algorithm, and it looks like the right one. http://codepad.org/JMt9E13T
########### > # # ### ### # # # # # # # # # # ### # # # # # # ### # ### # # # # # # ### # # # # # > ###########
It's completely reasonable in the modem age, imo. I'm fully self taught, running a startup, and just hired another self taught programmer whos doing great so far.
It'll be a lot of work, and time, but that sounds like it's not a big issue for you. There's tons of free tutorials on getting started in app development out there, and with services like firebase, you don't need to know web development to make a connected app.
The best first step would be to pick iOS or Android to start with. Learning the basics of native app development is important, whether you want to end up using something like Flutter or stick to fully native apps for each platform. The easiest deciding factor is, do you have a Mac and iPhone? You can only do iOS development on a Mac, and you'll need and iPhone to test on, the simulator is a bit lacking.
The best place to start is just building something though. Find a tutorial for the platform you want to try first, and just follow it. Install Android studio or Xcode, and see what you can figure out.
Union Find: http://codepad.org/qfkBv7lf Kinda messy code but half of it is printing. The way I did it meant walls are rendered not tiles. ________________________________________ | |______ | _ | | | | |____ | | | | | | _____ | | | _ _| | _ _ __ | | | | |__|_ |__|| _ | || _| | | | | __| | | | _ _ | | | | _ __| | ___ | _ || || _||| _|| || | | | __| | __| ___ _ | | || _|__ | | _ | |__ _______ ||| | | |__ |__ || _|_| | | | |__ _ | | | _ _ _________|| | || | | |_ | | |__________ ___________ _ | | | ___|_ | |__ | _ |__| |_ _ _|| | | __||_ | ||_ | | ||_ _____ | |____ ___|_ _____ | | _ | _ | || | || | |____ | _ |__ _ |__ | || | | _ _ _| |__ ___|_ || _|__ ||| | | | | | | | _| __ |__ |__ |_| | _ | | |__ || _| | _| | _| _ _ |_| |______ _ | _ | | | | __| |_| | | | | | | || _| _ | | ___ |__ |__ | |______||||__|_____||
It looks to be a simple implementation of a 2D Fenwick Tree. Take a look here, there is a draft of the code https://www.quora.com/How-do-I-implement-a-2D-binary-indexed-tree-for-range-update-and-range-query-operations he also mentions a problem D of code forces, so you can see some submissions of that problem to get a better grip of how to implement it.
Full source of my answer here, converting decimal to any base desired
http://jsfiddle.net/kageurufu/yUJXe/
Just threw this together to see if I could still do this, i havent written something like this since high school
I've implemented this in C and Python. I'm learning Javascript and I'm having trouble getting the design down. Really, I'm having trouble doing it without a hashtable-like structure. My Python code if anyone is interested: https://github.com/benbscholz/gibberish I would love feedback.
Yes, correct on all counts. Thank you. I have updated my post accordingly, and also added another solution for n=9, m=1. Combining these two solutions yields a solution for m=2. More examples are in the paper I mentioned, which I was able to download for free from Researchgate.
OK, sorry for not explaining properly, I don't have a technical background, what I mean is the same functionality as this Raspberry Pi box but on a phone
https://www.kiwix.org/en/downloads/kiwix-hotspot/
The task I linked to describes this as a Kiwix HTTP server, hope this makes sense
its as small as possible, and i counted down in the for loop in order to avoid recalculating a sqrt every iteration, and so i didnt have to use a temporary variable just to store the root
Thanks! After /u/rollie82 pointed it out, I realized that my linked list approach was dumb, exactly because I have to traverse the whole list for each .get(i). I am now reading The Algorithm Design Manual trying to figure out what data structure to use (some kind of tree for sure).
Thanks for the help!