Info Edge
10+ Karle Infra Interview Questions and Answers
You are Harshad Mehta’s friend. He told you the price of a particular stock for the next ‘N’ days. You can either buy or sell a stock. Also, you can only complete at most 2-transactions. Find ...read more
Ninja is learning the binary representation of the numbers. He wanted to practice the topic, so he picked a question. The problem statement says, two numbers, ‘A’ and ‘B’ are given. Find the numb...read more
You have been given a binary tree of integers. Your task is to print the boundary nodes of this binary tree in Anti-Clockwise direction starting from the root node.
NOTE:
The boundary nodes of...read more
You are given a linked list of 'N' nodes and an integer 'K'. You have to reverse the given linked list in groups of size K i.e if the list contains x nodes numbered from 1 to x, then you...read more
Q5. 2. From an array of integers which contains values for a particular stock . Find the value at which a person should buy and sell such that the profit is maximum.
Find the maximum profit from buying and selling a stock given an array of its values.
Iterate through the array and keep track of the minimum value seen so far.
Calculate the profit at each index and update the maximum profit seen.
Return the maximum profit.
Q6. 1. Count the number of flips require to convert a binary string of 0 and 1 such that resultant string has alternate 0 and 1
Count the number of flips required to convert a binary string to alternate 0 and 1.
Iterate through the string and count the number of flips required to make it alternate.
Keep track of the current character and the expected character.
Example: 001101 -> 010101 requires 2 flips.
Example: 101010 -> 010101 requires 3 flips.
Q7. 4. Reverse a linked list in groups of k nodes.
Reverse a linked list in groups of k nodes.
Divide the linked list into groups of k nodes
Reverse each group of k nodes
Connect the reversed groups to form the final linked list
Use recursion or iteration to implement the solution
Q8. 3. Boundary traversal of a tree.
Boundary traversal of a tree
Boundary traversal involves visiting the nodes on the boundary of a tree in a specific order
Start with the root node and traverse the left boundary, then the leaf nodes from left to right, and finally the right boundary
Use recursion to traverse the left and right subtrees
Exclude the leaf nodes that are also part of the left or right boundary
Q9. coding assignment for binary search
Implement binary search algorithm to find a target string in a sorted array of strings.
Ensure the array of strings is sorted before performing binary search.
Compare the target string with the middle element of the array and adjust the search range accordingly.
Repeat the process until the target string is found or the search range is exhausted.
Q10. Build an MVC architecture
MVC architecture separates an application into Model, View, and Controller components for better organization and scalability.
Model represents the data and business logic
View displays the data to the user
Controller handles user input and updates the model
Example: Model - User class with properties like name, email; View - HTML template to display user info; Controller - User controller to handle user actions
Top Senior Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month