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”. 🐮🐶
Given a string containing characters
')' 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”. ☃️ ⛄️
You are given a…
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”. 🤓😎
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
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”.
In an array
1s, how many non-empty subarrays have sum
Approach 1: Prefix sums using dictionary
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…
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
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.
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…