MO.AT

Mohit Athwani's

Adventures in C++, iOS, Unix, and the biggest of all..Life!.

Mohit Athwani

From India to California. In search of greener pastures. Writing about C++, Swift, algorithms and my life in general.

Read More

Posts

Weaving two arrays

Algorithms, Backtracking, Recursion

This is an interesting recursion problem where the aim is to find all the possible weaves of 2 arrays keeping the relative order of the elements the same.

Read More

Generate Parantheses

Algorithms, Backtracking, Recursion, String, Leetcode

Before we start solving this problem, let’s do some math first. The problem statement clearly states that we have N pairs of parentheses to work with. That means for a string to be considered as part of the solution, it must be of size 2N.

Read More