Add office photos
Employer?
Claim Account for FREE

DE Shaw

3.8
based on 154 Reviews
Video summary
Filter interviews by

60+ Rupeeseed Technology Ventures Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Tower Building Problem Statement

Given an array 'ARR' of 'N' cubes, you need to construct towers such that each cube can either be placed on top of an existing tower or start a new one. The restriction is that ...read more

Ans.

The task is to determine the minimum number of towers needed to stack cubes in a specific order.

  • Iterate through the array of cubes and maintain a stack to keep track of towers.

  • For each cube, check if it can be placed on an existing tower or start a new one.

  • Update the stack based on the cube's size and count the number of towers needed.

  • Return the minimum number of towers required.

  • Example: For input N = 3, ARR = [3, 2, 1], the output should be 1.

View 1 answer

Q2. Rabbit Jumping Problem

Consider 'n' carrots numbered from 1 to 'n' and 'k' rabbits. Each rabbit jumps to carrots only at multiples of its respective jumping factor Aj (i.e., Aj, 2Aj, 3Aj, ...), for all rabbits ...read more

Ans.

Calculate uneaten carrots by rabbits with specific jumping factors.

  • Iterate through each carrot and check if any rabbit jumps on it.

  • Use the jumping factors to determine which carrots will be eaten.

  • Subtract the eaten carrots from the total to get the uneaten carrots.

Add your answer

Q3. Coin Game Problem Statement

Wong wants to borrow money from Dr. Strange, who insists Wong must win a coin game first. The game involves two players taking turns to remove one coin from either end of a row of co...read more

Ans.

Given an array of coin values, determine the maximum value Wong can obtain by playing a coin game against Dr. Strange.

  • Wong plays first and can remove one coin from either end of the array on each turn.

  • The game ends when no coins are left, and the player with the highest total value wins.

  • Consider different scenarios like having an odd or even number of coins in the array.

Add your answer

Q4. Money Saving in Bank Problem

Harshit wants to save up money for his first car by depositing money daily in the Ninja bank with a specific increment strategy.

Starting with 1 rupee on the first Monday, the amoun...read more

Ans.

Calculate the total money accumulated by Harshit in Ninja bank after N days with a specific increment strategy.

  • Start with 1 rupee on the first Monday and increase by 1 rupee each day from Tuesday to Sunday.

  • Each new Monday starts with an additional rupee more than the previous Monday's deposit.

  • Calculate the total amount of money accumulated after N days for each test case.

  • Example: For N = 2, total amount is 3 rupees; for N = 5, total amount is 15 rupees.

Add your answer
Discover Rupeeseed Technology Ventures interview dos and don'ts from real experiences

Q5. K Most Frequent Elements Problem Statement

Given an integer array ARR and an integer K, identify the K most frequent elements within ARR. Return these elements sorted in ascending order.

Example:

Input:
ARR = [...read more
Ans.

Identify K most frequent elements in an array and return them sorted in ascending order.

  • Use a hashmap to store the frequency of each element in the array.

  • Sort the elements based on their frequency in descending order.

  • Return the first K elements from the sorted list.

Add your answer

Q6. Stock Investment Problem Statement

You are given the prices of a particular stock over 'N' consecutive days. Your task is to find the maximum profit that can be obtained by completing at most two transactions. ...read more

Ans.

Find the maximum profit that can be obtained by completing at most two transactions of buying and selling a stock.

  • Iterate through the array of stock prices and calculate the maximum profit that can be obtained by completing at most two transactions.

  • Keep track of the maximum profit that can be obtained by selling the stock on each day after buying it on a previous day.

  • Consider all possible combinations of two transactions to find the maximum profit.

  • Return the maximum profit fo...read more

Add your answer
Are these interview questions helpful?

Q7. Minimum Removals Problem Statement

Given an array ARR of size N and an integer K, determine the minimum number of elements that must be removed from the array so that the difference between the maximum and mini...read more

Ans.

The problem involves finding the minimum number of elements to remove from an array so that the difference between the maximum and minimum element is less than or equal to a given value.

  • Iterate through the array and keep track of the minimum and maximum elements.

  • Calculate the difference between the maximum and minimum elements.

  • If the difference is greater than the given value, increment the count of elements to remove.

  • Return the count of elements to remove as the result.

Add your answer

Q8. Conquering the Best Kingdom Problem Statement

Aragorn, an influential ruler, aspires to expand his power by conquering more kingdoms. There are 'N' kingdoms numbered from 0 to N-1, forming a tree structure. The...read more

Ans.

Given a tree structure of kingdoms, determine if it's possible to conquer more kingdoms than Aragorn by strategically choosing the starting kingdom.

  • Start at the kingdom adjacent to Aragorn's initial kingdom

  • Choose the kingdom that allows you to capture the most number of kingdoms in subsequent turns

  • Consider the tree structure to plan your conquest strategically

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. Minimum Number of Taps to Water the Garden

Given a garden that extends along a one-dimensional x-axis from point 0 to point N, your task is to determine the minimum number of taps needed to water the entire gar...read more

Ans.

Find the minimum number of taps needed to water the entire garden using given tap ranges.

  • Iterate over taps and update the farthest point each tap can reach.

  • Use a greedy approach to select the tap that can water the farthest point.

  • If a tap can't water any point, return -1.

  • Example: For ranges = [3, 4, 1, 1, 0, 0], tap at position 1 can water the entire garden.

Add your answer

Q10. Find Magic Index in Sorted Array

Given a sorted array A consisting of N integers, your task is to find the magic index in the given array, where the magic index is defined as an index i such that A[i] = i.

Exam...read more

Ans.

Find the magic index in a sorted array where A[i] = i.

  • Use binary search to efficiently find the magic index in the sorted array.

  • Check the middle element of the array and compare it with its index to determine the direction to search.

  • Repeat the process on the left or right half of the array until the magic index is found or no more elements to search.

Add your answer

Q11. MegaPrime Numbers Problem Statement

Given two integers Left and Right, determine the count of 'megaprime' numbers within the inclusive range from 'Left' to 'Right'. A 'megaprime' number is a prime number where ...read more

Add your answer

Q12. K Max Sum Combinations Problem Statement

Given two arrays/lists A and B, each of size N, and an integer K, you need to determine the K maximum and valid sum combinations from all possible combinations of sums g...read more

Ans.

The problem involves finding the K maximum sum combinations from two arrays by adding one element from each array.

  • Iterate through all possible sum combinations of elements from arrays A and B.

  • Store the sums in a max heap to keep track of the K maximum sums.

  • Pop the top K elements from the max heap to get the K maximum sum combinations.

Add your answer

Q13. What is the difference between default and copy constructor?

Ans.

Default constructor is provided by the compiler if no constructor is defined. Copy constructor creates a new object by copying an existing object.

  • Default constructor initializes member variables to default values.

  • Copy constructor creates a new object with the same values as an existing object.

  • Default constructor is called automatically by the compiler if no constructor is defined.

  • Copy constructor is called when an object is passed by value or when a new object is initialized ...read more

Add your answer

Q14. What is the difference between primary key and unique key?

Ans.

Primary key uniquely identifies a record in a table, while unique key ensures that all values in a column are distinct.

  • Primary key can't have null values, while unique key can have one null value.

  • A table can have only one primary key, but multiple unique keys.

  • Primary key is used as a foreign key in other tables, while unique key is not.

  • Example: Primary key - employee ID, Unique key - email address.

Add your answer

Q15. What is the difference between Truncate and Delete?

Ans.

Truncate removes all data from a table while Delete removes specific data from a table.

  • Truncate is faster than Delete as it doesn't log individual row deletions.

  • Truncate resets the identity of the table while Delete doesn't.

  • Truncate can't be rolled back while Delete can be.

  • Truncate doesn't fire triggers while Delete does.

Add your answer

Q16. Majority Element - II Problem Statement

You are given an array ARR of integers of length N. Your task is to find all the elements that occur strictly more than floor(N/3) times in the given array.

Input:

The fi...read more
Add your answer

Q17. Water Equalization Problem Statement

You are provided with an array ARR of positive integers. Each integer represents the number of liters of water in a bucket. The goal is to make the liters of water in every ...read more

Ans.

Given an array of water buckets, find the minimum liters of water to remove to make all buckets equal.

  • Iterate through the array to find the maximum frequency of a water amount

  • Calculate the total liters to be removed by subtracting the maximum frequency from the total number of buckets

  • Return the total liters to be removed as the answer

Add your answer

Q18. What is the difference between C and C++?

Ans.

C++ is an extension of C with object-oriented programming features.

  • C++ supports classes and objects while C does not.

  • C++ has better support for polymorphism and inheritance.

  • C++ has a standard template library (STL) which C does not have.

  • C++ allows function overloading while C does not.

  • C++ has exception handling while C does not.

Add your answer

Q19. Bottom View of Binary Tree

Given a binary tree, determine and return its bottom view when viewed from left to right. Assume that each child of a node is positioned at a 45-degree angle from its parent.

Nodes in...read more

Add your answer

Q20. Jump Game Problem Statement

In this problem, you are given an array ARR consisting of N integers. Your task is to determine the minimum number of jumps required to reach the last index of the array N - 1. At an...read more

Add your answer

Q21. Alien Dictionary Problem Statement

You are provided with a sorted dictionary (by lexical order) in an alien language. Your task is to determine the character order of the alien language from this dictionary. Th...read more

Add your answer

Q22. What is the difference between DML and DLL?

Ans.

DML is Data Manipulation Language used to manipulate data in a database. DLL is Data Definition Language used to define database schema.

  • DML is used to insert, update, delete data in a database.

  • DLL is used to create, alter, drop database objects like tables, views, indexes.

  • DML statements include INSERT, UPDATE, DELETE.

  • DLL statements include CREATE, ALTER, DROP.

  • DML affects data in a database, DLL affects the structure of a database.

Add your answer

Q23. What is the difference between DBMS and RDBMs?

Ans.

DBMS is a software system to manage databases while RDBMS is a type of DBMS that uses a relational model.

  • DBMS stands for Database Management System while RDBMS stands for Relational Database Management System.

  • DBMS can manage any type of database while RDBMS uses a relational model to manage data.

  • DBMS does not enforce any specific data model while RDBMS enforces a relational data model.

  • Examples of DBMS include MongoDB, Cassandra, and Redis while examples of RDBMS include MySQL...read more

Add your answer

Q24. Chocolate Distribution Problem

You are given an array/list CHOCOLATES of size 'N', where each element represents the number of chocolates in a packet. Your task is to distribute these chocolates among 'M' stude...read more

Add your answer

Q25. Minimum Fountains Activation Problem

In this problem, you have a one-dimensional garden of length 'N'. Each position from 0 to 'N' has a fountain that can provide water to the garden up to a certain range. Thus...read more

Ans.

Find the minimum number of fountains to activate to water the entire garden.

  • Iterate through the array to find the coverage of each fountain.

  • Keep track of the farthest coverage reached by each activated fountain.

  • Activate the fountain that covers the farthest distance not yet covered.

  • Repeat until the entire garden is watered.

Add your answer

Q26. Is Binary Heap Tree Problem Statement

You are given a binary tree of integers. Your task is to determine if it is a binary heap tree or not.

Input:

The first line of input contains an integer ‘T’ denoting the n...read more
Add your answer

Q27. Delete a Node from a Linked List

You are provided with a linked list of integers. Your task is to implement a function that deletes a node located at a specified position 'POS'.

Input:

The first line contains a...read more
Ans.

Implement a function to delete a node from a linked list at a specified position.

  • Traverse the linked list to find the node at the specified position.

  • Update the pointers of the previous and next nodes to skip the node to be deleted.

  • Handle cases where the position is at the beginning or end of the linked list.

  • Ensure to free the memory of the deleted node to avoid memory leaks.

Add your answer

Q28. Check if Binary Search Tree (BST)

Given a binary tree with 'N' nodes, verify whether this tree is a Binary Search Tree (BST). Return true if it is a BST and false otherwise.

Definition:

A Binary Search Tree (BS...read more

Ans.

Verify if a given binary tree is a Binary Search Tree (BST) or not.

  • Check if the left subtree of a node contains only nodes with values less than the node's value.

  • Check if the right subtree of a node contains only nodes with values greater than the node's value.

  • Ensure that both the left and right subtrees are also binary search trees.

  • Return true if the tree is a BST, false otherwise.

  • Handle cases with duplicate elements in either subtree.

Add your answer

Q29. Reverse Linked List Problem Statement

Given a singly linked list of integers, return the head of the reversed linked list.

Example:

Initial linked list: 1 -> 2 -> 3 -> 4 -> NULL
Reversed linked list: 4 -> 3 -> 2...read more
Ans.

Reverse a singly linked list of integers and return the head of the reversed linked list.

  • Iterate through the linked list and reverse the pointers to point to the previous node instead of the next node.

  • Use three pointers to keep track of the current, previous, and next nodes while reversing the linked list.

  • Update the head of the reversed linked list as the last node encountered during the reversal process.

Add your answer

Q30. What is the purpose of Normalisation?

Ans.

Normalisation is the process of organizing data in a database to reduce redundancy and improve data integrity.

  • Normalisation helps to eliminate data redundancy and inconsistencies

  • It ensures that each piece of data is stored in only one place

  • It helps to improve data integrity and accuracy

  • It makes it easier to maintain and update the database

  • There are different levels of normalisation, each with its own set of rules and guidelines

Add your answer

Q31. Ways to Arrange Balls Problem

You are given 'a' balls of type 'A', 'b' balls of type 'B', and 'c' balls of type 'C'. Determine the total number of ways to arrange these balls in a straight line so that no two a...read more

Ans.

The problem involves arranging balls of different types in a straight line without having two adjacent balls of the same type.

  • Use recursion to try all possible arrangements while keeping track of the previous ball type.

  • Handle edge cases where one or more types of balls have a count of 0.

  • Consider using dynamic programming to optimize the solution by storing intermediate results.

  • For the given example input (2 1 1), the output is 6 as there are 6 valid arrangements.

  • For the input...read more

Add your answer

Q32. Ways To Make Coin Change

Given an infinite supply of coins of varying denominations, determine the total number of ways to make change for a specified value using these coins. If it's not possible to make the c...read more

Ans.

The task is to find the total number of ways to make change for a specified value using given denominations.

  • Use dynamic programming to solve this problem efficiently.

  • Create a 2D array to store the number of ways to make change for each value up to the specified value.

  • Iterate through each denomination and update the array accordingly.

  • The final answer will be stored in the last cell of the array.

  • Example: For N=3, D=[1, 2, 3], V=4, the output is 4 as explained in the example.

Add your answer

Q33. Longest Common Subsequence of Three Strings

Given three strings A, B, and C, the task is to determine the length of the longest common subsequence across these three strings.

Explanation:

A subsequence of a str...read more

Ans.

Find the length of the longest common subsequence among three strings.

  • Use dynamic programming to solve this problem efficiently.

  • Create a 3D array to store the lengths of common subsequences.

  • Iterate through the strings to fill the array and find the longest common subsequence length.

Add your answer

Q34. Best Time To Buy and Sell Stock Problem Statement

You are given an array 'PRICES' of 'N' integers, where 'PRICES[i]' represents the price of a certain stock on the i-th day. An integer 'K' is also provided, ind...read more

Ans.

The task is to determine the maximum profit achievable with at most K transactions by buying and selling stocks.

  • Iterate through the array and keep track of the minimum price to buy and maximum profit for each transaction.

  • Use dynamic programming to store the maximum profit at each day with each possible number of transactions.

  • Consider edge cases like when K is 0 or when the array is empty.

  • Example: For input N = 6, PRICES = [3, 2, 6, 5, 0, 3], K = 2, the output would be 7.

Add your answer

Q35. Find the Lone Set Bit

Your task is to identify the position of the only '1' bit in the binary representation of a given non-negative integer N. The representation contains exactly one '1' and the rest are '0's....read more

Ans.

Find the position of the only '1' bit in the binary representation of a given non-negative integer.

  • Iterate through the bits of the integer to find the position of the lone '1' bit.

  • Use bitwise operations to check if there is exactly one '1' bit in the binary representation.

  • Return the position of the lone '1' bit or -1 if there isn't exactly one '1'.

Add your answer

Q36. Pythagorean Triplets Detection

Determine if an array contains a Pythagorean triplet by checking whether there are three integers x, y, and z such that x2 + y2 = z2 within the array.

Input:

The first line contai...read more
Ans.

Detect if an array contains a Pythagorean triplet by checking if x^2 + y^2 = z^2.

  • Iterate through all possible triplets of numbers in the array and check if they form a Pythagorean triplet.

  • Use a nested loop to generate all possible combinations of three numbers from the array.

  • Check if the sum of squares of two numbers is equal to the square of the third number.

Add your answer

Q37. Longest Increasing Subsequence Problem Statement

Given 'N' students standing in a row with specific heights, your task is to find the length of the longest strictly increasing subsequence of their heights, ensu...read more

Ans.

Find the length of the longest strictly increasing subsequence of heights of students in a row.

  • Iterate through the heights array and for each student, find the length of the longest increasing subsequence ending at that student.

  • Use dynamic programming to keep track of the longest increasing subsequence length for each student.

  • Return the maximum length found in the dynamic programming array as the result.

  • Example: For heights [10, 20, 10, 30, 40], the longest increasing subsequ...read more

Add your answer

Q38. First Negative Integer in Every Window of Size K

Given an array of integers 'ARR' and an integer 'K', determine the first negative integer in every contiguous subarray (or window) of size 'K'. If a window does ...read more

Ans.

Find the first negative integer in every window of size K in an array.

  • Iterate through the array using a sliding window approach of size K

  • For each window, find the first negative integer and add it to the result array

  • If no negative integer is found in a window, add 0 to the result array

Add your answer

Q39. Candies Distribution Problem Statement

Prateek is a kindergarten teacher with a mission to distribute candies to students based on their performance. Each student must get at least one candy, and if two student...read more

Ans.

The task is to distribute candies to students based on their performance while minimizing the total candies distributed.

  • Create an array to store the minimum candies required for each student.

  • Iterate through the students' ratings array to determine the minimum candies needed based on the adjacent ratings.

  • Consider both left-to-right and right-to-left passes to ensure fair distribution.

  • Calculate the total candies required by summing up the values in the array.

  • Example: For rating...read more

Add your answer

Q40. Validate Binary Search Tree (BST)

You are given a binary tree with 'N' integer nodes. Your task is to determine whether this binary tree is a Binary Search Tree (BST).

BST Definition:

A Binary Search Tree (BST)...read more

Ans.

Validate if a given binary tree is a Binary Search Tree (BST) or not.

  • Check if the left subtree of a node contains only nodes with data less than the node's data

  • Check if the right subtree of a node contains only nodes with data greater than the node's data

  • Recursively check if both left and right subtrees are also binary search trees

Add your answer

Q41. Validate BST Problem Statement

Given a binary tree with N nodes, determine whether the tree is a Binary Search Tree (BST). If it is a BST, return true; otherwise, return false.

A binary search tree (BST) is a b...read more

Ans.

Validate if a binary tree is a Binary Search Tree (BST) or not.

  • Check if the left subtree of a node contains only nodes with data less than the node's data.

  • Check if the right subtree of a node contains only nodes with data greater than the node's data.

  • Ensure that both the left and right subtrees are also binary search trees.

  • Traverse the tree in an inorder manner and check if the elements are in sorted order.

  • Use recursion to validate each node and its subtrees.

Add your answer

Q42. Find the Missing Number in an Arithmetic Progression

You are given a sorted array consisting of ‘N’ distinct integers, forming a nearly complete Arithmetic Progression, except for one missing element. Your task...read more

Add your answer

Q43. Find the Duplicate Number Problem Statement

Given an integer array 'ARR' of size 'N' containing numbers from 0 to (N - 2). Each number appears at least once, and there is one number that appears twice. Your tas...read more

Ans.

Find the duplicate number in an array of integers from 0 to (N-2).

  • Iterate through the array and keep track of the count of each number using a hashmap.

  • Return the number with a count greater than 1 as the duplicate number.

  • Alternatively, use Floyd's Tortoise and Hare algorithm to find the duplicate number in O(N) time and O(1) space.

Add your answer

Q44. Count Ways to Reach the N-th Stair Problem Statement

You are provided with a number of stairs, and initially, you are located at the 0th stair. You need to reach the Nth stair, and you can climb one or two step...read more

Ans.

The problem involves counting the number of distinct ways to climb N stairs by taking 1 or 2 steps at a time.

  • Use dynamic programming to solve the problem efficiently.

  • The number of ways to reach the Nth stair is the sum of the number of ways to reach the (N-1)th stair and the (N-2)th stair.

  • Handle base cases where N=0 and N=1 separately.

  • Consider using modulo operation to avoid overflow when dealing with large numbers.

Add your answer

Q45. What are class access modifiers?

Ans.

Class access modifiers are keywords used to control the visibility and accessibility of class members.

  • There are four access modifiers in Java: public, private, protected, and default

  • Public members can be accessed from anywhere

  • Private members can only be accessed within the same class

  • Protected members can be accessed within the same class, subclasses, and same package

  • Default members can be accessed within the same package

Add your answer

Q46. Candy Distribution Problem Statement

Prateek, a kindergarten teacher, needs to distribute candies to his class. Each child has a performance grade, and all students stand in a line.

The rules for distributing c...read more

Ans.

Calculate the minimum number of candies needed to distribute to students based on their performance grades.

  • Create an array to store the minimum candies needed for each student.

  • Iterate through the students' ratings from left to right, comparing each student with the previous one to determine the candy count.

  • Iterate through the students' ratings from right to left, comparing each student with the next one to ensure the correct candy count.

  • Sum up the total candies needed for all...read more

Add your answer

Q47. Time to Burn Tree Problem

You are given a binary tree consisting of 'N' unique nodes and a start node where the burning will commence. The task is to calculate the time in minutes required to completely burn th...read more

Ans.

Calculate the time in minutes required to completely burn a binary tree starting from a given node.

  • Start burning from the given node and spread fire to adjacent nodes each minute

  • Track the time taken for each node to burn and return the maximum time taken

  • Use a queue to keep track of nodes to be burned next

Add your answer

Q48. Binary Ones Count Problem

Develop a program to determine the number of '1's in the binary form of a given integer.

Input:

The input consists of a single line containing an integer N.

Output:

The output should b...read more
Ans.

Count the number of '1's in the binary form of a given integer.

  • Convert the given integer to binary representation

  • Count the number of '1's in the binary representation

  • Return the count of '1's as output

Add your answer

Q49. Equalize Water in Buckets

You are provided with an array, ARR, of positive integers. Each integer represents the number of liters of water in a bucket. The goal is to make the water volume in each bucket equal ...read more

Ans.

Find the minimum amount of water to be removed to equalize water in buckets.

  • Iterate through the array to find the average water level.

  • Calculate the total amount of water that needs to be removed to equalize the buckets.

  • Keep track of the excess water in each bucket and sum them up to get the final result.

Add your answer

Q50. What are access specifiers?

Ans.

Access specifiers are keywords in object-oriented programming languages that determine the visibility and accessibility of class members.

  • Access specifiers are used to restrict access to class members.

  • There are three types of access specifiers: public, private, and protected.

  • Public members can be accessed from anywhere in the program.

  • Private members can only be accessed within the class.

  • Protected members can be accessed within the class and its subclasses.

  • Example: class MyClas...read more

Add your answer

Q51. What is library functions?

Ans.

Library functions are pre-written code that can be reused to perform common tasks.

  • Library functions save time and effort by providing pre-written code.

  • They are often included in programming languages or external libraries.

  • Examples include functions for string manipulation, mathematical calculations, and file input/output.

  • Library functions can be called from within a program to perform specific tasks.

  • They can also be customized or extended to fit specific needs.

Add your answer

Q52. What is Recursion Function?

Ans.

Recursion function is a function that calls itself until a base condition is met.

  • Recursion is a technique used to solve problems by breaking them down into smaller sub-problems.

  • It involves a function calling itself with a modified input until a base case is reached.

  • Recursion can be used to solve problems such as factorial, Fibonacci series, and binary search.

  • Recursion can be implemented using loops as well, but it may not always be efficient.

  • Recursion can lead to stack overfl...read more

Add your answer

Q53. What is serialization?

Ans.

Serialization is the process of converting an object into a format that can be stored or transmitted.

  • Serialization is used to save the state of an object and recreate it later.

  • It is commonly used in network communication to transmit data between different systems.

  • Examples of serialization formats include JSON, XML, and binary formats like Protocol Buffers.

  • Deserialization is the opposite process of converting serialized data back into an object.

Add your answer
Q54. You have two wires of different lengths that are both capable of burning for exactly one hour when ignited at both ends. How can you measure a time interval of 45 minutes using these two wires?
Ans.

Use one wire to measure 30 minutes, then ignite the other wire at one end and the middle point to measure 15 minutes.

  • Ignite one wire at both ends and the other wire at one end. The first wire will burn out in 30 minutes.

  • At the same time, ignite the second wire at one end and the middle point. It will take 15 minutes for the fire to reach the middle point from one end.

  • When the first wire burns out, ignite the other end of the second wire. It will take another 15 minutes for th...read more

Add your answer

Q55. What is inheritance?

Ans.

Inheritance is a mechanism in object-oriented programming where a new class is created by inheriting properties of an existing class.

  • Inheritance allows code reusability and saves time and effort in programming.

  • The existing class is called the superclass or parent class, and the new class is called the subclass or child class.

  • The subclass inherits all the properties and methods of the superclass and can also add its own unique properties and methods.

  • For example, a class 'Anima...read more

Add your answer

Q56. What is a stack?

Ans.

A stack is a data structure that follows the Last-In-First-Out (LIFO) principle.

  • Elements are added to the top of the stack and removed from the top.

  • Common operations include push (add element) and pop (remove element).

  • Stacks can be implemented using arrays or linked lists.

  • Examples include the call stack in programming and the undo/redo feature in text editors.

Add your answer

Q57. What is an Assembly?

Ans.

Assembly is a low-level programming language that is used to write programs that can directly interact with computer hardware.

  • Assembly language is specific to a particular computer architecture.

  • It is a low-level language that is difficult to read and write.

  • Assembly language programs are faster and more efficient than programs written in high-level languages.

  • Examples of assembly language include x86, ARM, and MIPS.

  • Assembly language is often used for system-level programming, d...read more

Add your answer

Q58. Design a class which has director, HOD, Professor and students. They all are reporting to their respective heads. I have to display the hierarchy structure of the information in a Site

Ans.

Design a class hierarchy for director, HOD, Professor and students reporting to their respective heads.

  • Create a base class for all employees with common attributes and methods

  • Create derived classes for director, HOD, Professor and students

  • Implement reporting hierarchy using pointers or references

  • Display hierarchy structure on the site using a tree or graph

  • Consider adding additional attributes and methods as needed

Add your answer

Q59. OOP Java Design problems

Ans.

Answering OOP Java design problems

  • Identify the problem domain and create a class hierarchy

  • Use encapsulation to hide implementation details

  • Apply inheritance to reuse code and create subtypes

  • Implement polymorphism to allow objects to take on multiple forms

  • Avoid tight coupling and favor composition over inheritance

  • Use design patterns to solve common problems

  • Consider SOLID principles for maintainable code

Add your answer

Q60. OOP concepts in Java

Ans.

OOP concepts in Java

  • Encapsulation - hiding implementation details

  • Inheritance - creating new classes from existing ones

  • Polymorphism - ability of objects to take on multiple forms

  • Abstraction - focusing on essential features and ignoring the rest

  • Example: A Car class can inherit from a Vehicle class

  • Example: A Dog class can have a bark() method that overrides the Animal class's makeSound() method

  • Example: A Shape class can have an abstract method called calculateArea()

  • Example: A Ba...read more

Add your answer

Q61. Various sections of memory stack, heap, data. Explain them using a code

Ans.

Explanation of memory sections: stack, heap, data

  • Stack: stores function calls and local variables

  • Heap: dynamically allocated memory

  • Data: global and static variables

  • Example: int x; //data, int *y = new int; //heap, void foo() { int z; } //stack

Add your answer

Q62. Find the endianess of a machine using a function

Ans.

A function to determine the endianess of a machine

  • Create a variable with value 1

  • Cast the variable to a byte array

  • If the first byte is 1, the machine is little endian, else big endian

Add your answer

Q63. Profit on sale of asset impact on financial statements

Add your answer

Q64. Thrashing and why it occurs

Ans.

Thrashing occurs when a computer's performance suffers due to excessive swapping of data between RAM and virtual memory.

  • Thrashing happens when the system is overburdened with too many processes and there is not enough physical memory to handle them.

  • The operating system starts swapping data between RAM and virtual memory, which slows down the system.

  • This can lead to a vicious cycle where the system spends more time swapping than executing processes, causing further slowdowns.

  • T...read more

Add your answer

Q65. Median of two sorted arrays

Ans.

Finding median of two sorted arrays

  • Merge the two arrays and find the median

  • Use binary search to find the median in O(log(min(m,n))) time

  • Divide both arrays into two parts and compare the medians to discard half of the elements

Add your answer

Q66. Creating a pointer array

Ans.

To create a pointer array of strings:

  • Declare a pointer array variable with the desired size

  • Allocate memory for each string in the array using malloc

  • Assign the memory address of each string to the corresponding array element

Add your answer

Q67. Code for Reverse BST

Ans.

Code to reverse a binary search tree (BST)

  • Traverse the BST in post-order

  • Swap the left and right child of each node

  • Return the root node of the reversed BST

Add your answer

Q68. 2 dsa with sql

Ans.

Combining data structures and algorithms with SQL for efficient data manipulation and retrieval.

  • Use data structures like arrays, linked lists, trees, graphs for efficient storage and retrieval of data in memory.

  • Implement algorithms like sorting, searching, and graph traversal to manipulate data effectively.

  • Leverage SQL queries to interact with databases and perform operations like filtering, sorting, and joining data.

  • Combine data structures and algorithms with SQL to optimize...read more

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Rupeeseed Technology Ventures

based on 9 interviews
Interview experience
3.7
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

4.0
 • 569 Interview Questions
3.9
 • 396 Interview Questions
3.4
 • 278 Interview Questions
4.1
 • 272 Interview Questions
4.2
 • 173 Interview Questions
4.1
 • 148 Interview Questions
View all
Top DE Shaw Interview Questions And Answers
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