Nagarro
10+ Easy Design Systems Interview Questions and Answers
Q1. Trapping Rain Water Problem Statement
You are given a long type array/list ARR
of size N
, representing an elevation map. The value ARR[i]
denotes the elevation of the ith
bar. Your task is to determine the tota...read more
Q2. Segregate Odd-Even Problem Statement
In a wedding ceremony at NinjaLand, attendees are divided into two groups: bride’s side and groom’s side. Attendees from the bride’s side hold odd numbers, while those from ...read more
Q3. Smallest Window Problem Statement
Given two strings S
and X
containing random characters, the task is to find the smallest substring in S
which contains all the characters present in X
.
Input:
The first line co...read more
Q4. Count Derangements Problem Statement
You are tasked with finding the total number of derangements for a given set of elements. Specifically, for an integer N
, determine how many ways there are to permute a set ...read more
Q5. How is the search in Hashmap O(1).
Hashmap search has constant time complexity O(1) due to its use of hash function and index-based storage.
Hashmap uses a hash function to generate a unique index for each key-value pair
This index is used to directly access the value in the underlying array
As long as the hash function is well-designed and the array is large enough, search time remains constant
Example: searching for a value with key 'John' in a hashmap of 1000 entries takes the same time as searching in a hashma...read more
Q6. What is polymorphism?
Polymorphism is the ability of a single function or method to operate on different types of data.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
It enables a single interface to be used for different data types.
Examples include method overloading and method overriding in object-oriented programming.
Q7. Give real-life examples and code it.
Real-life examples and code for Technology Trainee interview question.
Example 1: Creating a simple calculator app in Python
Example 2: Implementing a basic chatbot using JavaScript
Example 3: Developing a website using HTML, CSS, and JavaScript
Q8. What is inheritance?
Inheritance is a concept in object-oriented programming where a class can inherit attributes and methods from another class.
Allows for code reusability and promotes the concept of hierarchical classification
Derived class inherits properties and behaviors of the base class
Types of inheritance include single, multiple, multilevel, and hierarchical inheritance
Q9. Implement DeQueue from scratch
Implement DeQueue using arrays in a programming language
Create an array to store the elements of the DeQueue
Implement functions to add elements at both ends of the DeQueue
Implement functions to remove elements from both ends of the DeQueue
Ensure proper handling of empty DeQueue and full DeQueue scenarios
Q10. Memory and runtime efficiency.
Memory and runtime efficiency are crucial for optimal performance of any technology.
Efficient algorithms and data structures can improve memory and runtime efficiency.
Caching and memoization can reduce runtime by storing frequently used data.
Optimizing code and reducing unnecessary computations can improve both memory and runtime efficiency.
Using appropriate programming languages and frameworks can also impact efficiency.
For example, using a compiled language like C++ can imp...read more
More about working at Nagarro
Interview Process at Easy Design Systems
Reviews
Interviews
Salaries
Users/Month