Random Wits

Life is too short for a diary

Projects

$ latest projects
     ├── encrypted-files
├── binary-semaphore
├── AES
└── DES
view all

Random

$ random stuff
├── my bookshelf
    ├── resources
    └── about me
say Hello

Back to Top


Sat 23 Sep 2017

Lazy Meditation

The sun’s rays had already crept through my window & drenched my room with light. Sleep taste sweetest when you resist it. It is but with a heavy heart that I relinquish my sleep & pull myself together.

But not today! It was a weekend that brought me few more drops of honey as I extended my sleep while a statue of abstemious Buddha, which I recently bought, wandered at the petty cumberworld outgrowing in both time & stupidity.

..

Continue reading → Tags : lazy meditation


Wed 26 Apr 2017

What India can learn from Pakistan?

On a brisk day, I was carpooling with my manager. Amidst the roaring traffic, was the familiar melodious voice on the radio. We have grown accustomed to the RJ who played songs that was music to our ears. As my manager revved up the engine, with the occasional drip in audio of the AM, often we broke into conversation.

Amartya Sen in his book, The Argumentative Indian, has argued the Indians are inherently loquacious. True to the argumentative traditions, our conversation percolated through the porous soil of sports into the sedimentary rocks of politics while amassing lump of Bollywood, music, economics, etc along the way. While an old classic Bollywood song played on the radio and I hummed along, dragging our conversation to halt. I gazed out of the window, many sign posts passed by, most of them visibly crestfallen like me...

Continue reading → Tags : india pakistan cow vigilantism


Sun 20 Mar 2016

Find kth largest element in an array

The other day I stumble upon the question to find the kth largest element in the array. At first glance, I thought the solution was trivial. But later I thought that there are multiple ways to achieve efficient solution

Heap is a useful data structure when root of the tree is important. Extracting an element from the heap is in logarithmic time. This could be used to find kth element from the array since finding maximum or minimum in heap is constant time...

Continue reading → Tags : algorithm ruby heap max-heap