Filter interviews by
Data structure and Java script coding
Top trending discussions
I appeared for an interview before Mar 2021.
Round duration - 120 Minutes
Round difficulty - Medium
This was an online MCQ + coding round where we had 1 hour to solve the MCQ's and another 1 hour to solve 2 coding
questions. The MCQ's were related to both General and Technical Aptitude.
You are provided with the root node of a binary tree containing 'N' nodes and an integer value 'TARGET'. Your task is to determine the number of leaf nodes for which the sum of the no...
Calculate the number of leaf nodes in a binary tree with a path sum equal to a given target.
Traverse the binary tree from root to leaf nodes while keeping track of the sum along the path.
Recursively check if the current node is a leaf node and if the sum equals the target.
Increment a counter if the conditions are met and return the counter as the result.
Determine if two given numbers 'a' and 'b' are coprime, meaning they have no common divisors other than 1.
t
a_1 b_1
a_2 b_2
...
a_t b_t
true / false
...
Check if two numbers are coprime by finding their greatest common divisor (GCD) and determining if it is 1.
Calculate the GCD of the two numbers using Euclidean algorithm.
If GCD is 1, the numbers are coprime; otherwise, they are not.
Iterate through all pairs of numbers provided in the input.
Return true if GCD is 1, false otherwise.
Round duration - 50 Minutes
Round difficulty - Medium
This was a standard DSA round where I was given 2 coding questions - the first one was related to DP and the second one was of Linked List. I first explained my approach and then coded the solutions in a production ready manner by applying proper coding principles.
You are provided with 'N' pairs of integers such that in any given pair (a, b), the first number is always smaller than the second number, i.e., a < b. A pai...
Find the length of the longest pair chain that can be formed using given pairs.
Sort the pairs based on the second element in increasing order.
Iterate through the sorted pairs and keep track of the maximum chain length.
Update the chain length if the current pair can be added to the chain.
Return the maximum chain length at the end.
You are provided with a singly linked list of integers. Your task is to determine whether the given singly linked list is a palindrome. Return true
if it is a pali...
Check if a given singly linked list is a palindrome or not.
Use two pointers approach to find the middle of the linked list.
Reverse the second half of the linked list.
Compare the first half with the reversed second half to determine if it's a palindrome.
Round duration - 60 Minutes
Round difficulty - Medium
This round started with 2 preety decent coding questions - one from DP and the other one was from Binary Search. This was followed by some questions from OOPS and then the interview ended with the interviewer asking me the famous 3-Ants and the Triangle Puzzle.
Given an array/list of positive integers and an integer K, determine if there exists a subset whose sum equals K.
Provide true
if such a subset exists, otherwise r...
Given an array of positive integers and an integer K, determine if there exists a subset whose sum equals K.
Use dynamic programming to solve this problem efficiently
Create a 2D array to store if a subset sum is possible for each element and each sum value
Iterate through the array and update the 2D array accordingly
Check if the value at the last element and K is true to determine if a subset sum equals K
Given a rotated sorted array ARR
of size 'N' and an integer 'K', determine the index at which 'K' is present in the array.
1. If 'K' is not present...
Given a rotated sorted array, find the index of a given integer 'K'.
Use binary search to find the pivot point where the array is rotated.
Based on the pivot point, perform binary search on the appropriate half of the array to find 'K'.
Handle cases where 'K' is not present in the array by returning -1.
Static polymorphism is resolved at compile time, while dynamic polymorphism is resolved at runtime.
Static polymorphism is achieved through function overloading and operator overloading.
Dynamic polymorphism is achieved through virtual functions and function overriding.
Example of static polymorphism: function overloading in C++.
Example of dynamic polymorphism: virtual functions in C++.
Abstraction in OOP is the concept of hiding complex implementation details and showing only the necessary features to the outside world.
Abstraction allows us to focus on what an object does rather than how it does it.
It helps in reducing complexity and improving maintainability of code.
Example: In a car, we don't need to know the internal working of the engine to drive it. We just need to know how to operate the pedals
Round duration - 30 Minutes
Round difficulty - Easy
This was a Technical Cum HR round where I was first asked some basic OOPS related concepts and then we discussed
about my expectations from the company , learnings and growth in the forthcomig years. I would suggest be honest and
try to communicate your thoughts properly in these type of rounds to maximise your chances of getting selected.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
posted on 14 Dec 2024
I applied via Naukri.com and was interviewed before Dec 2023. There were 2 interview rounds.
Virtual inheritance allows a derived class to inherit from a base class without creating duplicate base class subobjects.
Virtual inheritance is used to resolve the Diamond Problem in C++ where a class inherits from two classes that have a common base class.
It ensures that only one copy of the base class is inherited by the derived class.
Virtual inheritance introduces a virtual base class subobject to the derived class,...
A class for string operations can include methods for concatenation, substring extraction, length calculation, etc.
Create a class with methods like concatenateStrings, extractSubstring, calculateLength, etc.
Use string manipulation functions like substring, concat, length, etc. within the class methods.
Ensure error handling for edge cases like empty strings or out-of-bounds indices.
Example: class StringOperations { conc...
posted on 22 Sep 2023
I applied via Approached by Company and was interviewed before Sep 2022. There were 2 interview rounds.
Copy constructor is a special type of constructor which creates a new object as a copy of an existing object.
Copy constructor is used to initialize a new object as a copy of an existing object.
It takes an object of the same class as a parameter.
It is called automatically when a new object is created from an existing object.
Example: class MyClass { public: MyClass(const MyClass& obj) { // copy constructor logic } };
Copy constructor is used to create a new object as a copy of an existing object, while assignment operator is used to assign values from one object to another.
Copy constructor is called when a new object is created from an existing object, while assignment operator is called when an existing object is assigned values from another object.
Copy constructor creates a new object with its own memory space, while assignment o...
A static function is a function that is associated with a class rather than an instance of the class.
Static functions can be called without creating an instance of the class.
Static functions are commonly used for utility functions that do not require access to instance-specific data.
Static functions are declared using the 'static' keyword in many programming languages.
Example: 'Math.max()' in JavaScript is a static fun
Fibonacci series is a sequence of numbers where each number is the sum of the two preceding ones.
Start with 0 and 1 as the first two numbers in the series
Add the previous two numbers to get the next number in the series
Repeat this process to generate the Fibonacci series
Singleton design pattern ensures a class has only one instance and provides a global point of access to it.
Ensures a class has only one instance
Provides a global point of access to that instance
Commonly used in scenarios where only one instance of a class is needed, such as database connections or logging
posted on 14 Feb 2022
I applied via Naukri.com and was interviewed in Jan 2022. There were 4 interview rounds.
Accessing id parameter in URL involves parsing the URL and extracting the id value.
Use the window.location object to access the URL of the current page.
Parse the URL using methods like split() or URLSearchParams to extract the id parameter.
Example: If the URL is 'http://example.com/page?id=123', you can access the id value by parsing the URL.
posted on 18 Mar 2025
I appeared for an interview in Feb 2025, where I was asked the following questions.
I admire your company's innovative approach and commitment to quality, which aligns with my career goals and values as a developer.
Your company's focus on cutting-edge technology, like AI and machine learning, excites me as I want to work on impactful projects.
I appreciate your commitment to professional development, such as mentorship programs, which will help me grow my skills.
The collaborative culture here fosters c...
SQL constraints are rules applied to table columns to enforce data integrity and validity.
PRIMARY KEY: Uniquely identifies each record in a table. Example: `CREATE TABLE Users (UserID INT PRIMARY KEY);`
FOREIGN KEY: Ensures referential integrity between two tables. Example: `FOREIGN KEY (UserID) REFERENCES Users(UserID)`.
UNIQUE: Ensures all values in a column are different. Example: `CREATE TABLE Users (Email VARCHAR(25...
OOPs (Object-Oriented Programming) is a programming paradigm based on the concept of objects, which can contain data and code.
OOPs focuses on creating objects that interact with each other to solve a problem
Key principles include Inheritance, Encapsulation, Polymorphism, and Abstraction
Inheritance allows a class to inherit properties and behavior from another class
Encapsulation hides the internal state of an object and...
I applied via Campus Placement and was interviewed in Jun 2023. There were 3 interview rounds.
It had a test combining both coding and aptitude. It was of 90 minutes. Questions were decent and doable.
based on 1 interview
Interview experience
based on 2 reviews
Rating in categories
Senior Software Engineer
67
salaries
| ₹31.7 L/yr - ₹39 L/yr |
Technical Lead
42
salaries
| ₹13 L/yr - ₹34 L/yr |
Customer Success Manager
36
salaries
| ₹10 L/yr - ₹30 L/yr |
Senior Technical Support Engineer
32
salaries
| ₹9.5 L/yr - ₹20 L/yr |
Technical Support Engineer
31
salaries
| ₹5.2 L/yr - ₹13 L/yr |
Siemens
Schneider Electric
Johnson Controls
Honeywell Automation