Filter interviews by
Clear (1)
I applied via Naukri.com and was interviewed before Aug 2022. There were 3 interview rounds.
Contains two coding questions one is at medium level and other is easy level.
Top trending discussions
I was interviewed in Jul 2017.
Code to print * in five consecutive lines
Use a loop to iterate five times
Inside the loop, print a string containing a single * character
Code to calculate number of bounces a ball goes through until it comes to rest.
Use a loop to simulate the bounces until the ball stops bouncing
Calculate the height of each bounce using the given formula
Keep track of the number of bounces in a counter variable
The best and less time consuming way to calculate factorial of a number is using iterative approach.
Iteratively multiply the number with all the numbers from 1 to the given number
Start with a result variable initialized to 1
Multiply the result with each number in the range
Return the final result
Code to find factorial using function recursion
Define a function that takes an integer as input
Check if the input is 0 or 1, return 1 in that case
Otherwise, call the function recursively with input-1 and multiply it with the input
posted on 10 May 2015
Locate sum of 2 numbers in a linear array (unsorted and sorted) and their complexities
For unsorted array, use nested loops to compare each element with every other element until the sum is found
For sorted array, use two pointers approach starting from the beginning and end of the array and move them towards each other until the sum is found
Complexity for unsorted array is O(n^2) and for sorted array is O(n)
Pointers are used to manipulate memory addresses and values in C++. Increment/decrement, address of and value at operators are commonly used.
Incrementing a pointer moves it to the next memory location of the same data type
Decrementing a pointer moves it to the previous memory location of the same data type
The address of operator (&) returns the memory address of a variable
The value at operator (*) returns the value sto
To determine if a point is inside or outside a rectangle, we check if the point's coordinates fall within the rectangle's boundaries.
Check if the point's x-coordinate is greater than the left edge of the rectangle
Check if the point's x-coordinate is less than the right edge of the rectangle
Check if the point's y-coordinate is greater than the top edge of the rectangle
Check if the point's y-coordinate is less than the b...
To find line that divides rectangle into 2 equal halves through a point inside it.
Find the center of the rectangle
Draw a line from the center to the given point
Extend the line to the opposite side of the rectangle
The extended line will divide the rectangle into 2 equal halves
There are multiple combinations of 8-bit and 16-bit signed numbers. How many such combinations are possible?
There are 2^8 (256) possible combinations of 8-bit signed numbers.
There are 2^16 (65,536) possible combinations of 16-bit signed numbers.
To find the total number of combinations, we can add the number of combinations of 8-bit and 16-bit signed numbers.
Therefore, the total number of possible combinations is 256 +
Find duplicates in an array of elements in 0(n) time and 0(1) space.
Use the property of inputs to your advantage
Iterate through the array and mark elements as negative
If an element is already negative, it is a duplicate
Return all the negative elements as duplicates
posted on 6 Mar 2024
posted on 11 Jun 2022
I applied via LinkedIn and was interviewed in Dec 2021. There was 1 interview round.
I applied via Referral and was interviewed before Sep 2022. There were 4 interview rounds.
Aptitude Java CI/CD DevOps Unit testing HTML CSS
posted on 21 Mar 2022
I was interviewed in Aug 2021.
Round duration - 75 minutes
Round difficulty - Medium
This was an online coding round where I had 2 questions to solve under 75 minutes. Both the coding questions were related to DP and were of Medium to Hard level of difficulty.
Imagine Ninja is tackling a puzzle during his long summer vacation. He has two arrays of integers, each with lengths 'N' and 'M'. Ninja's task is to dete...
Find the length of the longest subsequence common to two arrays consisting only of prime numbers.
Iterate through both arrays to find prime numbers
Use dynamic programming to find the longest common subsequence
Consider edge cases like empty arrays or no common prime numbers
You are given an array ARR
of N integers. Your task is to perform operations on this array until it becomes empty, and maximize the sum of selected elements. In each operatio...
Given an array, select elements to maximize sum by removing adjacent elements. Return the maximum sum.
Iterate through the array and keep track of the frequency of each element.
Select the element with the highest frequency first, then remove adjacent elements.
Repeat the process until the array becomes empty and calculate the sum of selected elements.
Round duration - 60 minutes
Round difficulty - Medium
This round had 2 Algorithmic questions wherein I was supposed to code both the problems after discussing their approaches and respective time and space complexities . After that , I was grilled on some OOPS concepts related to C++.
Your task is to determine if a given Singly Linked List of integers forms a cycle.
Explanation: A cycle in a linked list occurs when there is a node in the list that conn...
Detect if a given singly linked list of integers forms a cycle.
Use Floyd's Tortoise and Hare algorithm to detect cycle in linked list
Maintain two pointers, one moving at double the speed of the other
If they meet at some point, there is a cycle in the linked list
Determine whether a given array ARR
of positive integers is a valid Preorder Traversal of a Binary Search Tree (BST).
A binary search tree (BST) is a tree structure w...
Check if a given array of positive integers is a valid Preorder Traversal of a Binary Search Tree (BST).
Create a stack to keep track of nodes.
Iterate through the array and compare each element with the top of the stack.
If the current element is less than the top of the stack, push it onto the stack.
If the current element is greater than the top of the stack, pop elements from the stack until a greater element is found ...
Vtable and VPTR are used in C++ for implementing polymorphism through virtual functions.
Vtable (Virtual Table) is a table of function pointers used to implement dynamic dispatch for virtual functions.
VPTR (Virtual Pointer) is a pointer that points to the Vtable of an object.
Vtable is created by the compiler for each class that has virtual functions.
VPTR is added as a hidden member in each object of a class with virtual...
Friend functions in C++ are functions that are not members of a class but have access to its private and protected members.
Friend functions are declared inside a class with the keyword 'friend'.
They can access private and protected members of the class.
They are not member functions of the class, but have the same access rights as member functions.
Friend functions are useful when you want to allow a function external to
Round duration - 60 minutes
Round difficulty - Medium
This was also a DS/Algo round where I was given 2 questions to solve and I was expected to come up with the optimal approach as far as possible. I solved both the questions with the optimal time and space complexities and then I was asked some more questions related to DBMS towards the end of the interview.
You are given a binary tree. Your task is to print the Top View of the Binary Tree, displaying the nodes from left to right order.
The first line contains an integer 't'...
The task is to print the Top View of a Binary Tree from left to right order.
Use a map to store the horizontal distance of each node from the root.
Perform a level order traversal of the tree and keep track of the horizontal distance of each node.
Print the nodes in the map in ascending order of their horizontal distance.
Handle the case where multiple nodes have the same horizontal distance by printing the one that appear
Given a string STR
, determine the total number of palindromic substrings within STR
.
The first line contains an integer 't' representing the number ...
Count the total number of palindromic substrings in a given string.
Iterate through each character in the string and expand around it to find palindromic substrings.
Use dynamic programming to store previously calculated palindromic substrings.
Consider both odd and even length palindromes while counting.
Example: For input 'abbc', palindromic substrings are ['a', 'b', 'b', 'c', 'bb']. Total count is 5.
DELETE removes specific rows from a table, while TRUNCATE removes all rows and resets auto-increment values.
DELETE is a DML command, while TRUNCATE is a DDL command.
DELETE can be rolled back, while TRUNCATE cannot be rolled back.
DELETE triggers delete triggers, while TRUNCATE does not trigger any triggers.
DELETE is slower as it maintains logs, while TRUNCATE is faster as it does not maintain logs.
Example: DELETE FROM t
Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity, while denormalization is the process of intentionally introducing redundancy to improve performance.
Normalization involves breaking down a table into smaller tables and defining relationships between them to reduce redundancy and dependency.
Denormalization involves combining tables and duplicating data to impr...
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.
I applied via Campus Placement and was interviewed in Oct 2023. There were 4 interview rounds.
Topics: maps, sorting and simple DSA question
A linked list is a data structure where each element points to the next element in the sequence.
Linked list is stored in memory as nodes, where each node contains data and a reference to the next node.
Examples of linked-list include a singly linked list, doubly linked list, and circular linked list.
In a singly linked list, each node points to the next node. In a doubly linked list, each node points to both the next and
ML models are built by collecting and preparing data, selecting a model, training the model on the data, and evaluating its performance.
Collect and prepare data by cleaning, transforming, and encoding it
Select a model based on the problem at hand (e.g. regression, classification, clustering)
Train the model using algorithms like linear regression, decision trees, or neural networks
Evaluate the model's performance using ...
Arrays store elements in contiguous memory locations, while linked lists store elements in nodes with pointers to the next node.
Arrays have fixed size, while linked lists can dynamically grow or shrink.
Accessing elements in arrays is faster (O(1)), while accessing elements in linked lists is slower (O(n)).
Inserting or deleting elements in arrays can be inefficient, as it may require shifting elements, while in linked l...
Return a string containing the first occurrence of characters in the input string.
Create an empty string to store the result.
Iterate through each character in the input string.
If the character is not already in the result string, add it to the result string.
Return the result string.
One of the hardest DSA questions I have done involved implementing a complex graph traversal algorithm.
The question required understanding of graph data structures and algorithms.
I had to implement a depth-first search or breadth-first search algorithm.
The question may have involved finding the shortest path in a weighted graph.
I had to consider edge cases and optimize the algorithm for efficiency.
2 hours of duration and medium level leetcode questions
OS stands for Operating System. It is a software that manages computer hardware and provides services for computer programs.
OS is the software that acts as an intermediary between computer hardware and user applications.
It manages computer resources such as memory, processors, devices, and file systems.
Examples of popular operating systems include Windows, macOS, Linux, and Android.
Deadlock can be avoided by implementing proper resource allocation strategies and using techniques like deadlock prevention, avoidance, detection, and recovery.
Implement proper resource allocation strategies such as resource ordering, wait-die, wound-wait, etc.
Use techniques like deadlock prevention by ensuring that the system never enters a deadlock state, avoidance by ensuring that the system does not enter an unsafe...
based on 1 interview
Interview experience
Senior Software Engineer
68
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer
64
salaries
| ₹0 L/yr - ₹0 L/yr |
Project Trainee
32
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Development Engineer
32
salaries
| ₹0 L/yr - ₹0 L/yr |
Technical Specialist
25
salaries
| ₹0 L/yr - ₹0 L/yr |
Siemens PLM Software
Dassault Systemes
Ansys Software Private Limited
Autodesk