I don’t think we understand infinity

Well, Ramanujan might’ve been a man who knew infinity, I am not sure if he understood it. Because I say so, if infinity is understood there is nothing else to understand anymore. For us it’s the distance between two points covered by a line in a particular direction that passes through only one of them. […]


What if this window falls off And the side wall with it It would be like that toy house But I’ll be the breathing body, Playing doll. My own true-woman show, Everyday and every night. I’m watched and moved on from. A gimmick of life, Frowned upon. A necessary evil, The fourth wall of a […]

Caution: Dread ahead

There is so much I am trying to avoid these days. Avoid even self confrontation. This is a confession to almost no one– that I am certain that this needs to be fixed. I am afraid there is no right way. I live in a circle. The “my perspective” can’t be shut. It’s always there. […]

Motherfucker Bertrand Russell

I’m gonna talk about the Russell’s Paradox and the motherfucker who wrote it. What’s a paradox? It’s the ultimate question. It has been echoing inside you all along. You see a pretty dress and see yourself in it, next moment you wonder why that old man is so weak and then why the fuck there […]


I don’t know what I am going to write about, but I guess I should because I don’t know what else is there to do? My priorities are made up, my principles too, my personal constitution and all the decisions are based on life events around me, and those I have procured in my big […]

This one is not code related

My last five posts have been completely naive in a sense that they describe merely the code of what I found amazing to have solved on my own or appreciated for a little amount of time at a point in my life while I was still exploring the programming world. Now that one long sentence […]

Counting Valleys

def countingValleys(n, s): valleys = 0 hikes = 0 for i in s: if i==’D’: if hikes==0: valleys += 1 hikes -= 1 else: hikes += 1 return valleys Gary is an avid hiker. He tracks his hikes meticulously, paying close attention to small details like topography. During his last hike, he took exactly  steps. For […]

Power Set – algorithmic and fast

class Solution: # @param A : list of integers # @return a list of list of integers def subsets(self, A):     if len(A) == 0:         return [[]]     h, t = A[0], A[1:]     subsets_excluding_h = self.subsets(t)     subsets_including_h = [sorted([h] + ss) for ss in subsets_excluding_h] […]


class Solution: # @param A : string # @return an integer def atoi(self, A): mx = (2**31)-1 mn = -(2**31) s = ” for x in A: if x.isdigit() or (A.index(x)==0 and x in (‘-‘, ‘+’)): s += x else: break if (s and s[0].isdigit()) or (len(s)>1 and s[0] in (‘+’, ‘-‘)): if 0 <= […]