Category: Misc

Treap Data Structure

A Treap Data Structure is basically a combination of a binary search tree and a heap.   Binary Search Trees – Deletions and additions of nodes can make the tree unbalanced (heavier on sides, therefore, the property we value about BSTs, the ability to distribute data by equal divisions, goes out of whack). Therefore you’d …

C program to print map of India

Write a C program to print map of India.     Below is obfuscated version in C that generates the map of India. Obfuscated code is any code that is difficult for humans to understand.

C++ program to print heart star pattern

Write a C++ program to print heart star pattern.     Wan’t to impress another geek friend on some special occasion. Here’s code to print heart shape

Search exceptions in huge log file | grep utility & Java program

This post discusses about grep utility and provides java code to search exceptions in a huge log file on windows server.   1. On Unix Server It is really frustrating when your code crashes in production. It is even more frustrating when you’re trying to search for an exception in a huge application log file(s). …