Logo
PublicationTech InterviewYouTubeSay Hello

#DSA

Popular Tags
  • #JAVASCRIPT
  • #ANDROID
  • #NODEJS
  • #BACKEND
  • #MACHINE_LEARNING
AfterAcademy Tech

AfterAcademy Tech

Gas Station Problem

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.

02 Jun 2020
Thumbnail

AfterAcademy Tech

AfterAcademy Tech

All Nodes Distance K in Binary Tree

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.

02 Jun 2020
Thumbnail

AfterAcademy Tech

AfterAcademy Tech

Binary Tree Zig Zag Level Order Traversal

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

04 May 2020
Thumbnail

AfterAcademy Tech

AfterAcademy Tech

Topological Sorting

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.

01 May 2020
Thumbnail

AfterAcademy Tech

AfterAcademy Tech

Optimal Substructure and Overlapping Subproblems

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.

01 May 2020
Thumbnail

AfterAcademy Tech

AfterAcademy Tech

Merge Overlapping Intervals

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

01 May 2020
Thumbnail

AfterAcademy Tech

AfterAcademy Tech

Path Sum In Binary Tree

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

01 May 2020
Thumbnail

AfterAcademy Tech

AfterAcademy Tech

Maximum Product Of Three Numbers

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.

01 May 2020
Thumbnail

AfterAcademy Tech

AfterAcademy Tech

Check If Two Arrays Are Equal Or Not

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.

01 May 2020
Thumbnail

AfterAcademy Tech

AfterAcademy Tech

Dijkstra’s Algorithm

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.

01 May 2020
Thumbnail

  • 1
  • …
  • 5
  • 6
  • 7
  • …
  • 17

Popular Tags
  • #JAVASCRIPT
  • #ANDROID
  • #NODEJS
  • #BACKEND
  • #MACHINE_LEARNING
CONNECT WITH US

© Copyright 2025 AfterAcademy
Privacy Policy
Terms And Conditions
Cookie Policy
This website uses cookies to ensure you
get the best experience on our website.
Read More