Filter interviews by
I applied via Campus Placement and was interviewed in Feb 2020. There were 5 interview rounds.
I applied via Recruitment Consultant and was interviewed before Jul 2020. There were 4 interview rounds.
I applied via Naukri.com and was interviewed before Jun 2021. There were 2 interview rounds.
I applied via Campus Placement and was interviewed before Oct 2019. There were 4 interview rounds.
Twitter system design involves multiple components such as servers, databases, caching, and APIs.
Use sharding to distribute data across multiple servers
Implement caching to reduce database load
Use message queues for handling high traffic
Implement APIs for user authentication and data retrieval
Use load balancers to distribute traffic evenly
Implement a search engine for efficient search functionality
The minimum number of platforms needed to avoid train crashes based on arrival and departure times.
Sort the arrival and departure arrays in ascending order.
Initialize a variable to keep track of the maximum number of platforms needed.
Iterate through the arrival and departure arrays simultaneously.
If the current arrival time is less than or equal to the current departure time, increment the platform count.
If the current...
Carwale interview questions for popular designations
Get interview-ready with Top Carwale Interview Questions
I was interviewed in Jan 2016.
To find the right view of a binary tree, we need to traverse the tree and keep track of the rightmost node at each level.
Traverse the tree using level order traversal
At each level, keep track of the rightmost node
Add the rightmost node to the result array
Return the result array
Find two missing numbers from an unsorted array in O(n) time complexity.
Calculate the sum of all numbers from 1 to n using the formula n*(n+1)/2
Calculate the sum of all numbers in the given array
Subtract the sum of array from the sum of all numbers to get the sum of missing numbers
Use the sum of missing numbers and the sum of squares of all numbers from 1 to n to calculate the missing numbers using simultaneous equatio
To find average salary without disclosing any one salary
Collect salaries of all employees
Add all salaries and divide by total number of employees
Do not disclose any individual salary
Divide a golden brick into minimum parts to pay daily salary to a worker.
The number of parts needed will depend on the daily salary of the worker.
The size of the parts should be equal.
The parts should be small enough to cover the daily salary but large enough to minimize the number of parts.
The formula to calculate the number of parts is: number of parts = total value of the golden brick / daily salary
posted on 30 Sep 2015
Find all permutations of a given string.
Use recursion to swap each character with every other character in the string.
Repeat the process for each substring.
Add the permutation to an array.
Given an array of size 98 with natural numbers from 1-100 but 2 numbers are missing, find them.
Calculate the sum of all numbers from 1-100 using the formula n(n+1)/2
Calculate the sum of all numbers in the array
Subtract the sum of array from the sum of all numbers to get the sum of missing numbers
Find the missing numbers by iterating through the array and checking which numbers are not present
Check if a binary tree is a binary search tree or not.
Traverse the tree in-order and check if the elements are in sorted order.
Check if the left child is less than the parent and the right child is greater than the parent.
Use recursion to check if all the subtrees are BSTs.
Maintain a range for each node and check if the node value is within that range.
Detect and remove cycle in a linked list
Use two pointers, one slow and one fast, to detect a cycle
Once a cycle is detected, move one pointer to the head and iterate both pointers until they meet again
Set the next node of the last node in the cycle to null to remove the cycle
Function to check if a string has all lowercase letters appearing at least once without extra space in O(N) time.
Create a boolean array of size 26 to keep track of the occurrence of each letter.
Iterate through the string and mark the corresponding index in the array as true.
Check if all the elements in the array are true and return yes if so.
Alternatively, use a bit vector to keep track of the occurrence of each letter
Convert a number to its hexadecimal form
Use the built-in function to convert the number to hexadecimal
Alternatively, use the algorithm to convert the number to hexadecimal manually
Ensure to handle negative numbers appropriately
Priority scheduling is a scheduling algorithm where processes are assigned priorities and executed based on their priority level.
Preemptive priority scheduling allows a higher priority process to interrupt a lower priority process that is currently running.
Non-preemptive priority scheduling allows a higher priority process to wait until the lower priority process finishes executing.
A low priority process can preempt a ...
Singleton class is a class that can only have one instance at a time.
Singleton pattern is used when we need to ensure that only one instance of a class is created and that instance can be accessed globally.
The constructor of a singleton class is always private to prevent direct instantiation.
A static method is used to access the singleton instance.
Example: public class Singleton { private static Singleton instance = ne...
Develop tic-tac-toe game using OOPS concepts in CPP.
Create a class for the game board
Create a class for the players
Create a class for the game logic
Use inheritance and polymorphism for game objects
Implement functions for checking win/lose/draw conditions
posted on 14 Oct 2015
posted on 30 Aug 2016
I was interviewed in Jan 2016.
Delete nodes in linkedlist with greater value on right side
Traverse the linked list from right to left
Compare each node with the maximum value seen so far
If the current node has a greater value, delete it
Update the maximum value seen so far
Check if given tree is BST or not
A binary tree is a BST if the value of each node is greater than all the values in its left subtree and less than all the values in its right subtree
Perform an in-order traversal of the tree and check if the values are in ascending order
Alternatively, for each node, check if its value is within the range defined by its left and right subtrees
OOP is a programming paradigm that organizes code into objects with properties and behaviors.
OOP stands for Object-Oriented Programming.
It focuses on creating reusable code by organizing it into objects.
Objects have properties (attributes) and behaviors (methods).
Encapsulation, inheritance, and polymorphism are key principles of OOP.
Example: In Java, a class represents an object with its properties and methods.
Runtime polymorphism is when the method to be executed is determined at runtime, while compile-time polymorphism is determined at compile-time.
Runtime polymorphism is achieved through method overriding.
Compile-time polymorphism is achieved through method overloading.
Runtime polymorphism is also known as dynamic polymorphism.
Compile-time polymorphism is also known as static polymorphism.
Runtime polymorphism is associate...
Virtual functions are functions in a base class that can be overridden by derived classes to provide different implementations.
Virtual functions are declared in a base class and can be overridden in derived classes.
They allow polymorphism, where a pointer to a base class can invoke different derived class implementations.
Virtual functions are resolved at runtime based on the actual object type.
They are used to achieve
An abstract class is a class that cannot be instantiated and is meant to be subclassed.
An abstract class can have both abstract and non-abstract methods.
It can provide a common interface for its subclasses.
Subclasses of an abstract class must implement all the abstract methods.
Abstract classes can have constructors.
An abstract class cannot be instantiated directly, but its subclasses can be.
Inheritance is a mechanism in object-oriented programming where a class inherits properties and behaviors from another class.
Inheritance allows code reuse and promotes code organization.
There are different types of inheritance: single inheritance, multiple inheritance, multilevel inheritance, hierarchical inheritance, and hybrid inheritance.
Single inheritance involves a class inheriting from a single base class.
Multipl...
Print Fibonacci series less than or equal to 1000.
Start with two variables, a and b, initialized to 0 and 1 respectively.
Print a and update a to the value of b, and b to the sum of the previous a and b.
Repeat until a exceeds 1000.
The sum of even numbers in the Fibonacci series is calculated.
Generate the Fibonacci series up to a given limit
Iterate through the series and check if each number is even
If the number is even, add it to the sum
Return the sum of the even numbers
Stacks are a data structure that follows the Last-In-First-Out (LIFO) principle.
Stacks have two main operations: push (adds an element to the top) and pop (removes the top element).
Stacks can be implemented using arrays or linked lists.
Common applications of stacks include function call stack, undo/redo operations, and expression evaluation.
Example: A stack of books, where the last book placed is the first one to be re
Implement max() function to find the maximum element in a stack with optimized time and space complexity.
Use an additional stack to keep track of the maximum element at each step.
When pushing an element onto the stack, compare it with the top element of the maximum stack and push the larger one.
When popping an element from the stack, also pop the top element from the maximum stack if they are equal.
The top element of t...
Top trending discussions
Some of the top questions asked at the Carwale interview -
The duration of Carwale interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 27 interviews
Interview experience
based on 158 reviews
Rating in categories
3-6 Yrs
Not Disclosed
4-5 Yrs
Not Disclosed
2-8 Yrs
Not Disclosed
Accounts Manager
134
salaries
| ₹0 L/yr - ₹0 L/yr |
Key Account Manager
91
salaries
| ₹0 L/yr - ₹0 L/yr |
Product Manager
28
salaries
| ₹0 L/yr - ₹0 L/yr |
Regional Manager
28
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Developer
23
salaries
| ₹0 L/yr - ₹0 L/yr |
MagicBricks
Impact Guru
Netmeds.com
Tracxn