Add office photos
Engaged Employer

Nagarro

4.0
based on 4.1k Reviews
Video summary
Filter interviews by

20+ Shades of Web Interview Questions and Answers

Updated 18 Dec 2024
Popular Designations

Q1. Digits Decoding Problem Statement

A few days back, Ninja encountered a string containing characters from ‘A’ to ‘Z’ which indicated a secret message. For security purposes, he encoded each character of the stri...read more

Ans.

The problem involves decoding a numeric sequence into a valid string using a given mapping of characters to numbers.

  • Use dynamic programming to count the number of ways to decode the sequence.

  • Consider different cases for decoding single digits and pairs of digits.

  • Keep track of the number of ways to decode at each position in the sequence.

  • Return the final count modulo 10^9 + 7 as the answer.

Add your answer

Q2. Secret Message Decoding Problem

Ninja encountered an encoded secret message where each character from 'A' to 'Z' is mapped to a numeric value (A = 1, B = 2, ..., Z = 26). Given a numeric sequence (SEQ) derived ...read more

Ans.

The problem involves decoding a numeric sequence back into a valid string based on a given mapping of characters to numeric values.

  • Use dynamic programming to keep track of the number of ways to decode the sequence at each position.

  • Consider edge cases such as '0' and '00' which do not have valid decodings.

  • Handle cases where two digits can be combined to form a valid character (e.g., '12' corresponds to 'L').

Add your answer

Q3. Character Counting Challenge

Create a program that counts and prints the total number of specific character types from user input. Specifically, you need to count lowercase English alphabets, numeric digits (0-...read more

Ans.

Create a program to count lowercase alphabets, digits, and white spaces from user input until '$' is encountered.

  • Read characters from input stream until '$' is encountered

  • Count lowercase alphabets, digits, and white spaces separately

  • Print the counts of each character type as three integers separated by spaces

Add your answer

Q4. Preorder Traversal Problem Statement

You are provided with the root node of a binary tree comprising N nodes. Your objective is to output its preorder traversal. Preorder traversal of a binary tree is performed...read more

Ans.

Implement a function to perform preorder traversal on a binary tree given the root node.

  • Create a recursive function to traverse the tree in preorder fashion.

  • Visit the root node, then recursively traverse left subtree, followed by right subtree.

  • Store the visited nodes in an array and return the array as the result.

  • Example: For the input tree [1, 2, 3, 4, -1, 5, 6, -1, 7, -1, -1, -1, -1, -1, -1], the preorder traversal output should be [1, 2, 4, 7, 3, 5, 6].

Add your answer
Discover Shades of Web interview dos and don'ts from real experiences

Q5. String Transformation Problem

Given a string (STR) of length N, you are tasked to create a new string through the following method:

Select the smallest character from the first K characters of STR, remove it fr...read more

Ans.

The task is to transform a given string by selecting the smallest character from the first K characters and appending it to a new string until the original string becomes empty.

  • Iterate through the string while there are characters remaining

  • For each iteration, select the smallest character from the first K characters

  • Remove the selected character from the original string and append it to the new string

  • Repeat until the original string is empty

  • Return the final new string

Add your answer

Q6. Make Unique Array Challenge

Your task is to determine the minimum number of elements that need to be removed from an array 'ARR' of size 'N' such that all the remaining elements are distinct. In simpler terms, ...read more

Ans.

Find the minimum number of elements to remove from an array to make all elements distinct.

  • Iterate through the array and keep track of the frequency of each element using a hashmap.

  • Count the number of elements that have a frequency greater than 1, as those need to be removed.

  • Return the count of elements to be removed.

Add your answer
Are these interview questions helpful?
Q7. Can you discuss the CTC (Cost to Company) offered in this position?
Ans.

The CTC offered for this position is competitive and includes salary, benefits, and bonuses.

  • CTC includes salary, benefits, bonuses, and any other perks offered by the company.

  • It is important to consider the overall compensation package, not just the base salary.

  • Negotiation for a higher CTC may be possible based on experience and skills.

  • Example: CTC for this position ranges from $100,000 to $120,000 per year.

Add your answer
Q8. Can you explain the concept of static variables and classes in Object-Oriented Programming?
Ans.

Static variables and classes in OOP are used to store data that is shared among all instances of a class.

  • Static variables are shared among all instances of a class and retain their value throughout the program's execution.

  • Static classes cannot be instantiated and are used to group related static members together.

  • Example: In a class representing a bank account, a static variable could be used to store the total number of accounts created.

  • Example: A static class in a math libra...read more

Add your answer
Share interview questions and help millions of jobseekers 🌟
Q9. Can you design a login page for Facebook?
Ans.

I can design a login page for Facebook with user input fields for email/phone and password, a 'Login' button, and 'Forgot password?' link.

  • Include user input fields for email/phone and password

  • Add a 'Login' button for submitting credentials

  • Include a 'Forgot password?' link for password recovery

  • Design the page with Facebook branding and color scheme

Add your answer

Q10. 4. React: What is Virtual DOM, useState and different types of Hooks in React

Ans.

Virtual DOM is a lightweight copy of the actual DOM, useState is a hook for managing state in functional components, and Hooks are functions that let you use state and other React features in functional components.

  • Virtual DOM is a lightweight copy of the actual DOM that React uses to improve performance by updating only the necessary parts of the actual DOM.

  • useState is a hook in React that allows functional components to have state. It returns an array with the current state ...read more

Add your answer

Q11. 5. SQL: Different Types of triggers, define index and its types

Ans.

Triggers in SQL are special stored procedures that are automatically executed when certain events occur in a database. Indexes in SQL are used to speed up the retrieval of data from tables.

  • Types of triggers: DML triggers (insert, update, delete), DDL triggers (create, alter, drop), and Logon triggers.

  • Indexes in SQL are used to quickly retrieve data from tables. Types of indexes include clustered, non-clustered, unique, and composite indexes.

  • Example: CREATE TRIGGER trgAfterIns...read more

Add your answer

Q12. create a todo kind app using react, then optimize by adding custom hooks, optimize performance

Ans.

Create a todo app using React, optimize with custom hooks for performance.

  • Create a basic todo app using React

  • Identify areas for optimization such as state management

  • Implement custom hooks for optimized performance

  • Use useMemo and useCallback hooks to optimize rendering

  • Consider lazy loading components for better performance

Add your answer

Q13. What is Node.js event loop and how its work?

Ans.

Node.js event loop is a mechanism that allows Node.js to perform non-blocking I/O operations asynchronously.

  • Event loop is responsible for handling asynchronous operations in Node.js.

  • It allows Node.js to perform multiple operations simultaneously without blocking the execution.

  • Event loop continuously checks the event queue for new events and executes them in a non-blocking manner.

  • Callbacks are used to handle the completion of asynchronous operations in Node.js.

Add your answer

Q14. What are functional interfaces in programming?

Ans.

Functional interfaces in programming are interfaces with only one abstract method, used for lambda expressions.

  • Functional interfaces have only one abstract method

  • They can have multiple default or static methods

  • Used for lambda expressions in Java 8+

  • Examples include java.lang.Runnable, java.util.Comparator

Add your answer

Q15. 3. JavaScript: difference between var and let keyword, closure function

Ans.

var keyword has function scope, let keyword has block scope. Closure function is a function defined inside another function.

  • var keyword has function scope, let keyword has block scope

  • Variables declared with var are hoisted to the top of their function, let variables are not hoisted

  • Closure function is a function defined inside another function, has access to the outer function's variables

Add your answer

Q16. what is MVVM and design patterns

Ans.

MVVM is a design pattern that separates the UI from the business logic, promoting code reusability and maintainability.

  • MVVM stands for Model-View-ViewModel

  • Model represents the data and business logic

  • View is the UI components that the user interacts with

  • ViewModel acts as a mediator between the Model and View, handling user inputs and updating the Model

  • Design patterns are reusable solutions to common problems in software design

  • Examples of design patterns include Singleton, Fact...read more

Add your answer

Q17. 1. Explain Middleware in .Net Core

Ans.

Middleware in .Net Core is a software component that acts as a bridge between an application's request processing pipeline and the server.

  • Middleware components are executed in the order they are added to the pipeline.

  • They can perform tasks like authentication, logging, error handling, etc.

  • Middleware can be added using the 'UseMiddleware' method in the 'Configure' method of Startup class.

Add your answer

Q18. explain Clean Architecture

Ans.

Clean Architecture is a software design approach that separates concerns and enforces a clear structure for code organization.

  • Clear separation of concerns between different layers (e.g. presentation, domain, data)

  • Dependency Rule: inner layers should not depend on outer layers

  • Use of interfaces to define boundaries between layers

  • Focus on testability and maintainability

  • Examples: Hexagonal Architecture, Onion Architecture

Add your answer

Q19. explain solid principles

Ans.

SOLID principles are a set of five design principles in object-oriented programming to make software designs more understandable, flexible, and maintainable.

  • Single Responsibility Principle (SRP) - A class should have only one reason to change.

  • Open/Closed Principle (OCP) - Software entities should be open for extension but closed for modification.

  • Liskov Substitution Principle (LSP) - Objects of a superclass should be replaceable with objects of its subclasses without affecting...read more

Add your answer

Q20. create debounce function

Ans.

Debounce function delays the execution of a function until after a specified amount of time has passed since the last time it was invoked.

  • Use setTimeout to delay the execution of the function

  • Use clearTimeout to reset the timer if the function is invoked again within the specified time period

  • Commonly used in scenarios like search bars to prevent excessive API calls

Add your answer

Q21. Intents in android

Ans.

Intents in Android are messaging objects used to request an action from another app component.

  • Intents are used to start activities, services, and broadcast receivers in Android.

  • There are two types of intents: explicit intents and implicit intents.

  • Explicit intents specify the component to start by name, while implicit intents specify the action to perform.

  • Example: Intent intent = new Intent(this, SecondActivity.class); startActivity(intent);

Add your answer

More about working at Nagarro

#2 Best Large Company - 2022
#1 Best IT/ITES Company - 2022
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Shades of Web

based on 27 interviews
4 Interview rounds
Aptitude Test Round
Coding Test Round
Technical Round
HR Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Senior Software Engineer Interview Questions from Similar Companies

3.7
 • 142 Interview Questions
3.7
 • 36 Interview Questions
4.1
 • 15 Interview Questions
2.8
 • 13 Interview Questions
3.9
 • 11 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter