AfterAcademy Tech
Stack is a very useful concept that a good programmer could use for their benefit. We will be discussing the basic design of stack and the operations that can be performed on it. We shall be also discussing the implementation of stack.
In this blog, we will analyze and compare different sorting algorithms on the basis of different parameters like Time Complexity, Inplace/Outplace, Stability, etc.
Given a binary tree, flatten it to a linked list in-place. After flattening, the left of each node should point to NULL and right should contain the next node in level order so that it resembles a singly linked list.
In this blog, we will analyze the recursive algorithm using Recurrence Tree Method, Master theorem. We will also discuss the advantages and disadvantages of recursion.
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differs by more than one.
There is a staircase of N steps and you can climb either 1 or 2 steps at a time. You need to count and return the total number of unique ways you can climb the staircase. The order of steps taken matters.
Iteration and Recursion are programming methodologies with similar objective and thus one might seem trivial compared to another, but that's not the case. We will be discussing the important differences between iteration and recursion and how both are useful.
Given a matrix or a 2-d array, you have to traverse the matrix in a spiral order. This is an interview question asked by companies like Microsoft and Amazon.
Given a non-empty binary tree, find maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node to any node in the tree along with the parent-child connections.
Two pointer approach is an essential part of a programmer’s toolkit, especially in technical interviews.