Am I just a magnet encountering issues right away first time I launch something in a while? This time, Intel HAXM failed to install during Android Studio setup and links suggested for manual installation were broken (outdated?).
Anyway, today I’m proud of fixing these 3 lines of code https://android-review.googlesource.com/c/platform/tools/adt/idea/+/1407727
Hopefully this will help someone later on.
Also, I’ve used Gerrit for the first time. Not bad – I love it!
This simple trick will make your program more compact and will impress your interviewers (I wouldn’t count on that hehe).
s[ch] = -~s[ch];
This is great because you can’t avoid writing “dumb” Array(256).fill(0) and similar stuff in your program.
Tip: Immutable DataStructures should be used whenever possible for memory efficiency.
Summary on GitHub https://github.com/DimitrisAndreou/memory-measurer/blob/master/ElementCostInDataStructures.txt
Here are some links to resources describing java data structures with pictures (in russian).
HashMap – http://habrahabr.ru/blogs/java/128017/
ArrayList – http://habrahabr.ru/blogs/java/128269/
LinkedList – http://habrahabr.ru/blogs/java/127864/
LinkedHashMap – https://habr.com/ru/post/129037/