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
    └── quotes
    └── about me
say Hello

Back to Top


Sat 07 Sep 2019

Recursively sort a array

I recently came across a simple telephonic interview problem. The problem was to sort an array recursively. But even numbers need to be placed before odd numbers. At first glance it was obvious that it was a simple case of implementation of merge sort.

Problem Statement

Given an input array, produce the following output array…..

Continue reading → Tags : programming interview merge sort sort java code


Wed 08 May 2019

Red Queen Race

When I was a kid, I was perturbed at the outbreaks of new diseases. There was no Swine Flue before twenty first century or HIV before tenth century. Why nature was hell-bent in pulling diseases out of a hat everytime humans make progress in science?

Naively I belived that new diseases were nature’s way of pushing against human’s advancement in science. Nature had to ensure that human’s dont overflow the planet. I belived in Rita (Sanskrit ṛta ), a cosmic order of the universe. The wheel of dharma(duty) & karma (accumulated effects of good and bad actions) somehow illusioned to maintain harmony in the world. But evolution shattered my perception of reality...

Continue reading → Tags : biology evolution antibiotics


Tue 08 Jan 2019

Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list.1. The new list should be made by splicing together the nodes of the first two lists.

It’s an easy problem in Leetcode for practicing linked list. It’s similar to the merge step of the Merge sort. ..

Continue reading → Tags : programming leetcode code