26 questions · from 2 interviews
BYJU'S interview questions
Every question candidates reported from their BYJU'S interviews, most frequently asked first. Each links to the write-up it came from, so you can see the round and how it went.
BYJU'S coding and DSA questions
- 01
What is a Stack?
Explain what a stack is, its fundamental operations (push, pop, peek), and its common applications.
Easy · From Strange Byju's interview
- 02
What is a Linked List?
Explain what a linked list is, its different types (singly, doubly, circular), and compare it with arrays.
Easy · From Strange Byju's interview
- 03
Subarray with Sum K
Given an array of integers and an integer k , find the total number of continuous subarrays whose sum equals k .
Medium · From BYJU's | OA+DS&PS | SE/SSE
- 04
Sort Array of 0s and 1s
Given an array containing only 0s and 1s, sort the array in ascending order.
Easy · From BYJU's | OA+DS&PS | SE/SSE
- 05
Minimum Distance Pair
Find the pair of elements in an array with the minimum absolute difference.
Medium · From BYJU's | OA+DS&PS | SE/SSE
- 06
Sum of All Nodes in BST
Calculate the sum of values of all nodes in a Binary Search Tree (BST).
Easy · From BYJU's | OA+DS&PS | SE/SSE
- 07
Second Largest Element in Array
Find the second largest element in a given array of integers.
Easy · From BYJU's | OA+DS&PS | SE/SSE
- 08
Middle of Linked List
Find the middle node of a singly linked list. If the list has an even number of nodes, return the second middle node.
Easy · From BYJU's | OA+DS&PS | SE/SSE
- 09
Validate Binary Search Tree
Given the root of a binary tree, determine if it is a valid Binary Search Tree (BST).
Medium · From BYJU's | OA+DS&PS | SE/SSE
- 10
Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
Medium · From BYJU's | OA+DS&PS | SE/SSE
- 11
Inorder Traversal Iterative
Perform an inorder traversal of a binary tree iteratively without using recursion.
Medium · From BYJU's | OA+DS&PS | SE/SSE
- 12
Inorder Traversal Morris
Perform an inorder traversal of a binary tree iteratively without using recursion or an explicit stack (Morris Traversal).
Hard · From BYJU's | OA+DS&PS | SE/SSE
- 13
Largest Rectangle in Histogram
Find the largest rectangle possible in a given histogram where each bar has a width of 1.
Hard · From BYJU's | OA+DS&PS | SE/SSE
- 14
Reverse Linked List
Reverse a singly linked list without using extra space (in-place).
Easy · From BYJU's | OA+DS&PS | SE/SSE
- 15
Set Matrix Zeroes
Given an m x n integer matrix, if an element is 0 , set its entire row and column to 0 .
Medium · From BYJU's | OA+DS&PS | SE/SSE
- 16
Coin Change
Given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money, return the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any…
Medium · From BYJU's | OA+DS&PS | SE/SSE
- 17
Binary Tree Zigzag Level Order Traversal
Given the root of 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).
Medium · From BYJU's | OA+DS&PS | SE/SSE
- 18
Binary Tree Left Side View
Given the root of a binary tree, imagine yourself standing on the 'left' side of it, return the values of the nodes you can see ordered from top to bottom.
Medium · From BYJU's | OA+DS&PS | SE/SSE
- 19
Diameter of Binary Tree
Given the root of a binary tree, return the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the root.
Easy · From BYJU's | OA+DS&PS | SE/SSE
- 20
Valid Parentheses
Given a string s containing just the characters '(', ')', '{', '}', '[', ']', determine if the input string is valid.
Easy · From BYJU's | OA+DS&PS | SE/SSE
- 21
Duplicate Parentheses
Given a balanced expression, find if it contains any duplicate parentheses. A set of parentheses are duplicate if the same subexpression is enclosed in multiple sets of parentheses.
Medium · From BYJU's | OA+DS&PS | SE/SSE
- 22
Common Elements in Three Sorted Arrays
Given three integer arrays nums1 , nums2 , and nums3 , sorted in strictly increasing order, return a sorted array of only the integers that appeared in all three arrays.
Easy · From BYJU's | OA+DS&PS | SE/SSE
- 23
Kth Largest Element in a BST
Given the root of a Binary Search Tree (BST) and an integer k , return the k th largest element in the tree.
Medium · From BYJU's | OA+DS&PS | SE/SSE
- 24
Search a 2D Matrix II
Write an efficient algorithm that searches for a target value in an m x n integer matrix. This matrix has the following properties: Integers in each row are sorted in ascending order. Integers in each column are sorted in ascending order.
Medium · From BYJU's | OA+DS&PS | SE/SSE
BYJU'S other questions
- 01
What is a Constructor?
Explain what a constructor is in object-oriented programming, its purpose, and different types of constructors.
Easy · From Strange Byju's interview
- 02
What are Classes and Methods?
Define what a class is and what methods are in object-oriented programming. Explain their relationship and purpose.
Easy · From Strange Byju's interview
BYJU'S interview questions FAQ
What questions are asked in BYJU'S interviews?
Candidates reported 26 distinct questions across 2 BYJU'S interviews. 24 coding and DSA questions, 2 other questions.
How difficult are BYJU'S interview questions?
Of the questions candidates rated, 46% were easy, 46% medium and 8% hard.