AfterAcademy Tech
There are N gas stations along a circular route, where the amount of gas at station i is arr[i]. You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to its next station (i+1). At the beginning of the journey, the tank is empty at one of the gas stations. Return the minimum starting gas station's index if you can travel around the circuit once, otherwise return -1.
Find all nodes at a distance k from a target node. This problem requires the knowledge of tree data structure. Recursion and tree traversals would be the base of the solution for this problem.
Given a binary tree, return the zigzag level order traversal of its nodes' values. (i.e, from left to right, then right to left for the next level and alternate between). The problem is a typical Interview problem based on Tree Traversal
In this blog, we will discuss Topological sort in a Directed Acyclic Graph. We will discuss what is the Topological Sort, how can we find Topological Ordering, Illustration using a Directed Acyclic Graph, its pseudo-code, and its applications.
In this blog, we will understand the optimal substructure and overlapping subproblems property. We will also discuss how the problems having these two properties can be solved using Dynamic programming.
You will be given a set of intervals in the form of a 2-D array, write a program to merge all the overlapping intervals, and return the array. This problem will clear the concept of intervals and Graph
Given a binary tree and a sum, write a program to determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Its an easy problem based on Binary tree traversal and a famous interview question
write a program to find three numbers whose product is maximum and output the maximum product. This is a basic mathematical problem and requires logical skill to solve.
Given two given arrays of equal length, Check if given arrays are equal or not. This is a tricky interview problem as, at first, this looks like problem-related to combinatorics but could be solved quickly upon thinking.
In this blog, we will discuss Dijkstra's Algorithm. We will discuss what is the Dijkstra's Algorithm, how can we find the shortest path from source to other vertices using Dijkstra's Algorithm in Graph, Illustration using an example, its pseudo-code.