Currently viewing the tag: "algorithm"
A couple of days ago I encountered this article: How Shazam Works
This got me interested in how a program like Shazam works… And more importantly, how hard is it to program something similar in Java?
Yesterday I found and programmed a nice little algorithm. I’m not going to tell you (yet) what it does and how its called, but I’ll just show the code:
private int function(int x, int y) { int r = 0; while(x!=0) { if((x&1)==1) { r+=y; } x>>>=1; y<<=1; } return r; }
So tell me, [...]
Latest tweet
- Unique, there is only one traffic jam in the Netherlands currently! The only problem? It is almost 1000km long.
Links
Archives

