Remove the Outermost Parentheses using Python
The Question
A valid parentheses string is either empty (""), "(" + A + ")", or A + B, where A and B are valid …
24 articles about interview development, tools, and best practices
A valid parentheses string is either empty (""), "(" + A + ")", or A + B, where A and B are valid …
Given an array of strings arr. String s is a concatenation of a sub-sequence of arr which have unique characters.
Return the maximum …
Read Article →Given the root node of a binary search tree, return the sum of values of all nodes with value between L and R (inclusive).
The binary search tree is …
Read Article →Given a fixed length array arr of integers, duplicate each occurrence of zero, shifting the remaining elements to the right.
Note that elements beyond …
Read Article →Let’s say that you have an array or a list, or logs.
Each of these logs is a space-delimited string of words.
For example:
logs = ["dig1 8 …
Take a string S of lowercase letters.
These letters form consecutive groupings of like characters.
Find groups with 3 or more like …
Read Article →This occasionally comes up during coding interviews and is actually quite a decent way to test someone’s aptitude of moving back and forth on a …
Read Article →Let’s say that you have a binary tree and we needed to know it’s maximum depth.
Binary tree input data [3,9,20,null,null,15,7] could be …
Fizz buzz is a common programming interview question.
The problem statement usually reads something like this:
Hackerrank.com
If we break this …
!-->!-->!-->!-->!--> Read Article →While there are libraries available for all programming languages that offer abilities to sort list, arrays and collections, it is important to know …
Read Article →Python comes with the power of slicing.
Let’s try it with a String:
>>> example1 = 'hello world'
>>> example1[::-1] …
Read Article →
Reversing a Binary Tree is a common programming interview question.
By learning how to Reverse a Binary Tree in Python, you are working towards …
Read Article →