Social Networking & Personalization Algorithms: We live in a (filter) bubble.

Perception and Imagination

In the book ConnectedNicholas Christakis and James Fowler expounded on the ways through which different forms and iterations of social media have shaped our lives.  Specifically, social media in recent years seems to be steroids-driven in connecting us.  Leveraging the example of how a virtual epidemic, literally, on popular Massively Multiplayer Online Role-Playing Game (MMORPGWorld of Warcraft became heavily scrutinized and researched on in the real world, Christakis and Fowler argue that the Internet has enabled profound changes to how we interact via social-networks in four ways:

  1. Enormity
  2. Communality
  3. Specificity
  4. Virtuality

Collectively, these four ways illustrate how the Internet has increased the size of our networks hugely by increasing the number of people who could join them, therein enabling us to share information and participate in collective endeavors more massively.  Suddenly, our world is filled with way more information than it used to before…

View original post 436 more words

Hashing – a programmer perspective

Sada Kurapati

As a programmer, I would say this is one of the best and most important techniques which I came across so far.

What is hashing?

To understand this, let us look at some of the definitions from the dictionary.

  • Hash (noun) – a dish of diced or chopped vegetables, a jumble
  • Hash (verb) – to chop into small pieces; make into hash
  • Hashing (Computers) – a technique for locating data in a file by applying a transformation, usually arithmetic, to a key

In simple words, it is a technique to transform a bigger data into a small key (word or number) and then using this key to identify that data whenever it is required. Let us take an example to understand this.

A simple example is the phone book. When we want to call a person named Sada, what exactly we do, go to phone book click on “S”…

View original post 1,453 more words

XOR swap algorithm


Conventional swapping requires the use of a temporary storage variable. Using the XOR swap algorithm, however, no temporary storage is needed. The algorithm is as follows:

X := X XOR Y
Y := X XOR Y
X := X XOR Y

To understand it, think about the PLUS swap algorithm
a = a + b
b = a – b
a = a -b

interpret XOR: it is a binary PLUS operation without carry.

View original post

z-algorithm for pattern matching

exactly i was searching

The Golden Age of Technology

String algorithms are a traditional area of study in computer science and there is a wide variety of standard algorithms available. The more algorithms you know, the more easier it gets to work with them 🙂 As the title of the post says, we will try to explore the z-algorithm today. Lets first formulate the problem statement and a couple of definitions. To start with lets look at the below mentioned question (from interviewstreet):


For two strings A and B, we define the similarity of the strings to be the length of the longest prefix common to both strings. For example, the similarity of strings “abc” and “abd” is 2, while the similarity of strings “aaa” and “aaab” is 3.

Calculate the sum of similarities of a string S with each of it’s suffixes.

Sample Input:

Sample Output:

For the first…

View original post 366 more words