Inflation is the increase in the prices of goods and services across an economy. When prices inflate, you need more money to buy the same things. The opposite of inflation is deflation, when prices are lower across a range of goods and services.
James Howell, a 17th century historian cum writer was the first writer to earn his living from writing alone in the English language; other writers of those times pursued writing as a hobby, not a profession as writing alone never paid enough.
You could have written the algorithm but not the original idea for the paper, so that puts your colleague as the first author. Your colleague did the writing part for the paper, but if he didn't came up with the original idea for the paper, then you're the first author.