#### ALGORITHM

### A boolean value interview question

Someone asked a question on StackOverflow, he was asked an interview question. The question is : Given 3 boolean variables a, b, c, return true if at least 2 out of the 3 are true. He gave the solution as follows :boolean atLeastTwo(boolean a, boolean b, boolean c) { if ((a && b) || (b && c) || (a && c)) { return true; } else { ret...

4,591 0 0 RETURN EXPRESSION BOOL CONDITIONAL

### Google search engine algorithm change history

Recently, Google had a major adjustment on its search algorithm: Users can directly see answers to the searched question on the top of the page.There are billion of search requests each day on Google. There is no doubt that the algorithm will become the subject of discussion. Last year, Google did an adjustment to its search algorithm every 17.5 hours in average. We all experience the change of the algorithm. Following information chart summarizes the major changes of Google search algorit...

4,344 0 0 GOOGLE HISTORY SEARCH ENGINE GOOGLE+

### Solving easy problems the hard way

There’s a charming little brain teaser that’s going around the Interwebs. It’s got various forms, but they all look something like this: This problem can be solved by pre-school children in 5-10 minutes, by programer – in 1 hour, by people with higher education … well, check it yourself! 8809=6 7111=0 2172=0 6666=4 1111=0 3213=0 7662=2 9313=1 0000=4 2222=0 3333=0 5555=0 8193=3 8096=5 7777=0 9999=4 7756=1 6855=3 9881=5 5531=0 2581=? SPOILER ALERT… The answer has to...

1,625 0 0 PROBLEM SOLVING

### How Speeding The "Most Important Algorithm Of Our Lifetime" Could Change This Modern World

Math breakthroughs don't often capture the headlines--but MIT researchers have just made one that could lead to all sorts of amazing technological breakthroughs that in just a few years will touch every hour of your life. Last week at the Association for Computing Machinery's Symposium on Discrete Algorithms (SODA) a new way of calculating Fast Fourier Transforms was presented by a group of MIT researchers. It's possible that under cert...

2,020 0 0 FFT FAST FOURIER TRANSFORM SPEED-UP

### Dividing any number By 9, 90, 900 and so on

The technique for Dividing any number by 9 mentally is simply to reduce a complex division to a very simple addition. The technique can be applied from both ends i.e. from right-most digit or from left-most digit. Dividing by 9 into a mixed number from right-most digit uses the Divisibility Rules for 9: 1. First, add all the digits together and divide by 9, keeping in mind the whole number and the remainder. 2. Write the remainder o...

### Overlap Detection

How does one detect when two strings overlap? In the case below, the four-letter suffix of string 1 matches the four-letter prefix of string 2. 1: "Fire at Will" 2: "William Riker is number one" Sometimes there are several matches; finding the longest is not always straight forward. 1: "Have some CoCo and CoCo" 2: "CoCo and CoCo is here." 2: "CoCo and CoCo is here." 2: "CoCo and CoCo is here." The naïve solution is to take e...

5,455 0 0 PYTHON IMPLEMENTATION STRING OVERLAP DETECTION

### Bytes Matter

I love to profile applications, because I always learn something that surprises me. Initial Profiler Surprise: Client Side Case in point, I was recently profiling our Android application, the Famigo Sandbox. This app sends a lot of data back and forth with our API, as we try to determine which of the apps on your phone are safe for your kids. I always assumed that, if app performance suffered during some of the ...

1,648 0 0 IMPORTANCE OPERATION LOW LEVEL BYTE

### Rediscovering the RSync Algorithm

A:Ok, you’re synchronizing this over the web; and what do you use for the synchronization? B: Oh, we implemented the rsync algorithm. A: uhu. And what do you do with really big files? B: The same. A: And you also synchronise folders? B: Yes. A: And how do you do that? B: we iterate over the folder, using the algorithm on every file, recursing over subfolders. A: Can you try 2 things for me? First, a very large file; and second, a large codebase, and see if it holds. Introduction First of al...

1,398 0 0 RESYNC ALGORITHM DISCOVERY