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


Fri 05 Aug 2016

Lost Friends

Today I walked a little further,
Few more steps than yesterday,
For I love walking,
And I have walked all my life.

My walk is not straight,
Often I stray from the path,
Lost in thoughts of wilderness,
Caged in the civilization of life.
..

Continue reading → Tags : friends poetry lost life


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


Sun 07 Feb 2016

A random stranger

It was just another day in Bangalore. I caught the bus from the Kormangala bus depot. Amid exhausting heat & nudging elbows, I somehow managed to grab a seat in the bus. Securing a seat in the Indian bus during peak time is considered a fortune. This often attracts resentful eyes. However my Indian genes have made me immune to both pani puri & judgment.

If you are lucky, you could get a window seat. This saves you from claustrophobia of the overcrowded isles. And today was my lucky day. I happily slumped down into my seat and peeped out of my window catching some glimpse of just another life on just another Indian road...

Continue reading → Tags : story india fiction bangalore sci-fi