Rotated Sorted Array Search

Problem Statement

Suppose a sorted array is rotated at some pivot unknown to you beforehand.

(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2 ).

You are given a target value to search. If found in the array, return its index, otherwise return -1. Continue reading “Rotated Sorted Array Search”

BrainFuck – Language Worthy The Name

Today we dive into the world of a programming language that still baffles every programmer despite being so easy. Yes! I am talking about BrainFuck (the programming language that can never be discussed in public). From the beginning, I should warn you that it has no practical use (yet) but could still be a great exercise into the world of parsing or computer science. Continue reading “BrainFuck – Language Worthy The Name”