This article talks about a problem famously known as Valid Parentheses. True to its name the problem deals with finding whether a given string has valid set of parentheses. If you have been around mathematics or vice-versa 😝, then you already know what does valid parentheses mean and the importance of it. For full blown solutions you can always refer LeetCode. This article intends to just “Spot the Differences”. 🐮🐶

Problem 1

Given a string containing characters '(' and ')' determine if the input string is valid. An input string is valid if, each opening bracket has a corresponding closing bracket.

>…


This article helps one understand — how to deep copy a Linked List. We start by looking at how to go about copying a singly Linked List, move on to discuss how to copy a doubly Linked List and then further discuss how can we copy a Linked List with random pointers. If you do not understand what we are saying then wait for it and follow along. For full blown solutions to these problems you can always refer to LeetCode. As always, the aim of this article is to just “Spot the Differences”. ☃️ ⛄️

Problem 1

You are given a…


Image for post
Image for post
Photo by Ali Abdul Rahman on Unsplash

The feeling of my thoughts
The smile which my insanity got
The quirk of some kind
The book which I couldn’t bind.


This article helps one understand — Binary Search and some tricks. We start by looking at the vanilla Binary Search algorithm and then move on to discuss some tweaked versions of Binary Search. For full blown solutions to these problems you can always refer LeetCode. This article intends to just “Spot the Differences”. 🤓😎

Problem 1

Suppose an array is sorted in ascending order and you are given a target value to search. If found in the array return its index, otherwise return -1.

Pretty simple, right?

Approach 1: Linear Search

A Brute approach would be to search for the element in…


This article would help you understand how two problems which seem so similar can have different approaches depending on the allowed input. If you are interested in learning more about the two-pointer technique and some interesting approaches along with their subtle differences then you are at the right place. For full blown solutions to these problems you can always refer LeetCode. This article intends to just “Spot the Differences”.

Problem 1

In an array A of 0s and 1s, how many non-empty subarrays have sum S?

Approach 1: Prefix sums using dictionary

This approach is similar to the approach generally taken for…


Image for post
Image for post
This is how I could explain the typical state of anxiety.

If you are someone who suffers from anxiety you might have often been asked what is anxiety? I am with those people who feel it’s totally abstract and I am also with those who have been through this phase. I say this because I know it’s difficult to comprehend anxiety.

Let me try to take a dig at explaining what I think anxiety is. My thoughts about anxiety might differ from yours, since I am just talking from my own experience with this devil.

I have always been a person who thinks a lot. Not saying that I am proud…


The melody dropped
into my ears
haven’t heard of it
in these passing years

The words were familiar
or at least a few I could catch
as I am walking
to its rhythm my heart is latched

The last time,
was 10 years back
Now I have lost the track,
of how many days had sunshine
and how many I had just to whine

The same route I took for 10 years
Has establishments with new gears
Today it has that old musical fountain
Where one day I felt drained

Where was all this ? How could I just miss…


Image for post
Image for post
Photo by Chris Lawton on Unsplash

Can I tell you about
that side of me which is weak
that side of me
which you are yet to see

It was hot summer day
I had a soda
You craved for wine
We had some conversation
Standing in this long line

And now its the winter chills
Barren trees
Road covered with leaves
As we take one more step
I still think
should I tell you about
that side of ME which you shouldn’t see.

~ Eclipse of Life : When the tides are strong and the forces are hidden.


Image for post
Image for post
Photo by Dariusz Sankowski on Unsplash

They said she was brave,
They had the courage she gave,
As all of them gathered,
They spoke about the time they were together,

Everyone had something to say,
Some of childhood,
Some of how she stood.

Granny was my hero,
She never called me a zero.

We got married when she said yes,
She looked so beautiful in a white dress,
For me she is still my part
Till my soul departs.

She was a dreamer,
She was smart,
Her life had everything,
One would aim with a dart.

She had followers, Her smile captured hearts, But she was…

Divya Godayal

Editor @ CoderChef Kitchen | https://bit.ly/2F2sjee | Heart speaks rhyme

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store