Logo
PublicationTech InterviewYouTubeSay Hello

#DSA

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

AfterAcademy Tech

Average of Levels in Binary Tree

Given a binary tree, write a program to return the average value of the nodes on each level in the form of an array. The range of the node's value is in the range of 32-bit signed integer.

05 Nov 2020
Thumbnail

AfterAcademy Tech

AfterAcademy Tech

Find The Height Of a Binary Tree

Given a binary tree, write a program to find the maximum depth of the binary tree. The maximum depth is the number of nodes along the longest path from the root node to the leaf node. A leaf is a node with no child nodes.

03 Nov 2020
Thumbnail

AfterAcademy Tech

AfterAcademy Tech

LRU Cache Implementation

Design and implement a data structure for Least Recently Used(LRU) cache. Your data structure must support two operations: get(key) and put(). The problem expects a constant time solution

13 Oct 2020
Thumbnail

AfterAcademy Tech

AfterAcademy Tech

Letter Combinations of a Phone Number

Given a string str, containing digits from 2 - 9 inclusive, write a program to return all the possible letter combinations that the number could represent. This is a popular coding interview question based on backtracking and recursive approach.

12 Oct 2020
Thumbnail

AfterAcademy Tech

AfterAcademy Tech

Reverse a Stack Using Recursion

Given a stack of integers st, write a program to reverse the stack using recursion. This problem will clear the concept of recursion.

06 Oct 2020
Thumbnail

AfterAcademy Tech

AfterAcademy Tech

Reverse First K Elements Of A Queue

Given an integer K and queue Q of integers. Write a program to reverse the order of the first K elements of the queue. The other elements will be in the same relative order.

05 Oct 2020
Thumbnail

AfterAcademy Tech

AfterAcademy Tech

Validate Stack Sequences

Given two sequences pushed and popped with distinct values, write a program to return true if and only if this could have been the result of a sequence of push and pop operations on an initially empty stack.

05 Oct 2020
Thumbnail

AfterAcademy Tech

AfterAcademy Tech

Surrounded regions

Given a 2-D matrix board where every element is either 'O' or 'X', write a program to replace 'O' with 'X' if surrounded by 'X'. It is a famous problem based on the concept of flood fill algorithms

23 Sep 2020
Thumbnail

AfterAcademy Tech

AfterAcademy Tech

Recursive Insertion Sort

Write a program for the recursive implementation of Insertion Sort. Insertion Sort is used to sort a given array. This problem will sharpen your recursion skills.

23 Sep 2020
Thumbnail

AfterAcademy Tech

AfterAcademy Tech

When to Convert a 2-D DP array to 1-D DP array And How?

In which situation 2 dimensional DP can be dropped to 1 dimension? Is there any principle or regular pattern? This is a very important question when it comes to optimization of DP arrays. Let's find out.

16 Sep 2020
Thumbnail

  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 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