
Hexaware Technologies

Hexaware Technologies Software Developer Intern Interview Questions and Answers
Q1. Kth Largest Element Problem
Given an array containing N
distinct positive integers and a number K
, determine the Kth largest element in the array.
Example:
Input:
N = 6, K = 3, array = [2, 1, 5, 6, 3, 8]
Output...read more
Find the Kth largest element in an array of distinct positive integers.
Sort the array in non-increasing order and return the Kth element.
Handle multiple test cases efficiently.
Ensure all elements in the array are distinct.
Q2. Maximum Sum Path from Leaf to Root
Given a binary tree with 'N' nodes, identify the path from a leaf node to the root node that has the maximum sum among all root-to-leaf paths.
Example:
All the possible root t...read more
Find the path from a leaf node to the root node with the maximum sum in a binary tree.
Traverse the binary tree from leaf nodes to the root while keeping track of the sum of each path.
Compare the sums of all paths and return the path with the maximum sum.
Use recursion to traverse the tree efficiently.
Consider edge cases such as when the tree is empty or has only one node.
Q3. Fishmonger Toll Optimization Problem
A fishmonger needs to transport goods from a port to a market, crossing multiple states each requiring a toll. The goal is to minimize the toll costs while ensuring the jour...read more
The Fishmonger Toll Optimization Problem involves minimizing toll costs while ensuring timely delivery of goods from a port to a market.
Given 'N' states and a time limit 'M', find the smallest toll amount to reach the market from the port within the given time.
Use dynamic programming to solve the problem efficiently.
Consider the time and toll matrices to calculate the minimum toll cost.
Return -1 if it is not possible to reach the market within the given time limit.
Q4. Add Two Numbers Represented as Linked Lists
Given two linked lists representing two non-negative integers, where the digits are stored in reverse order (i.e., starting from the least significant digit to the mo...read more
Add two numbers represented as linked lists and return the sum as a linked list.
Traverse both linked lists simultaneously while keeping track of carry from previous sum
Create a new linked list to store the sum digits
Handle cases where one list is longer than the other by adding remaining digits with carry
Remember to handle the case where there is a carry after adding all digits
Q5. Shape and Method Overriding Problem Statement
Create a base class called Shape
that contains a field named shapeType
and a method printMyType
.
Implement two derived classes:
- Square: This class inherits from
Sh...read more
Create base class Shape with field shapeType and method printMyType. Implement Square and Rectangle classes with calculateArea method.
Create a base class Shape with shapeType field and printMyType method.
Implement Square and Rectangle classes inheriting from Shape.
Include additional fields like length and breadth in Square and Rectangle classes.
Override printMyType method in Square and Rectangle classes to output the type of object.
Implement calculateArea method in Square and...read more
Yes, I can write an essay on any topic and present it verbally.
Choose a topic that interests you and research it thoroughly
Create an outline with an introduction, body paragraphs, and a conclusion
Use clear and concise language to convey your ideas
Practice presenting your essay verbally to improve your delivery
Engage your audience by maintaining eye contact and using gestures
Be prepared to answer questions or discuss your essay further
ACID properties are a set of properties that guarantee the reliability of transactions in database management systems.
ACID stands for Atomicity, Consistency, Isolation, and Durability.
Atomicity ensures that either all operations in a transaction are completed successfully or none are.
Consistency ensures that the database remains in a consistent state before and after the transaction.
Isolation ensures that the execution of multiple transactions concurrently does not interfere ...read more
An E-R Diagram for Uber would include entities like User, Driver, Ride, Payment, and Location.
Entities: User, Driver, Ride, Payment, Location
Relationships: User requests Ride, Driver provides Ride, Payment for Ride
Attributes: User ID, Driver ID, Ride ID, Payment ID, Location ID
Example: User (1) requests Ride (A) from Location (X) to Location (Y) with Driver (Z) providing the Ride and Payment (123) made for the Ride.

Top Software Developer Intern Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

