
HexaView Technologies

10+ HexaView Technologies Interview Questions and Answers
Q1. Minimum Special Sum Problem
You are given an array ARR
of length N
. There are two operations defined for each index i
in the array:
- FIRST_SUM(i): Calculates the sum of the first
i
numbers. - LAST_SUM(i): Calcula...read more
Find the minimum special sum for each index in an array by calculating the sum of first and last elements.
Iterate through the array and calculate the special sum for each index using the given operations.
Keep track of the minimum special sum encountered so far.
Return the minimum special sum found for all indices in the array.
Q2. Missing Number Problem Statement
You are provided with an array named BINARYNUMS
consisting of N
unique strings. Each string represents an integer in binary, covering every integer from 0 to N except for one. Y...read more
Given an array of unique binary strings representing integers from 0 to N, find and return the missing integer's binary representation without leading zeros.
Iterate through the array of binary strings and convert each string to its decimal equivalent.
Calculate the sum of all integers from 0 to N using the formula (N * (N + 1)) / 2.
Subtract the sum of the converted integers from the total sum to find the missing integer.
Convert the missing integer to binary and return it as a ...read more
Q3. Number Pattern Problem Statement
Given an integer 'N', print a specific pattern on 'N' lines where numbers are aligned in a particular format.
Example:
Input:
N = 4
Output:
1
232
34543
4567654
Explanation:
The ...read more
Print a specific number pattern on 'N' lines where numbers are aligned in a particular format.
Iterate through each row from 1 to N
Print spaces before the numbers based on the row number
Print numbers in increasing order up to the row number, then in decreasing order
Q4. Wildcard Pattern Matching Problem Statement
Implement a wildcard pattern matching algorithm to determine if a given wildcard pattern matches a text string completely.
The wildcard pattern may include the charac...read more
Implement a wildcard pattern matching algorithm to determine if a given wildcard pattern matches a text string completely.
Create a recursive function to match the pattern with the text character by character
Handle cases for '?' and '*' characters in the pattern
Keep track of the current position in both pattern and text strings
Return 'True' if the pattern matches the text completely, otherwise return 'False'
Q5. Spiral Matrix Problem Statement
You are given a N x M
matrix of integers. Your task is to return the spiral path of the matrix elements.
Input
The first line contains an integer 'T' which denotes the number of ...read more
The task is to return the spiral path of elements in a given matrix.
Iterate through the matrix in a spiral path by adjusting the boundaries of rows and columns.
Keep track of the direction of traversal (right, down, left, up) to form the spiral path.
Handle edge cases such as when the matrix is a single row or column.
Implement a function to print the spiral path of the matrix elements.
Q6. Pattern Printing Task
You are tasked with printing a specific pattern based on the given number of rows, 'N'. For any input value of 'N', generate and print a pattern as described in the example.
Input:
1 5
Ou...read more
The task is to print a specific pattern based on the given number of rows, 'N'.
Iterate through each row and print the numbers in the specified pattern
Use loops to print the numbers in the required order
Ensure there is exactly one space between each value in a row
Q7. 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
Calculate the time in minutes required to completely burn a binary tree starting from a given node.
Traverse the tree to find the start node and calculate the time for fire to spread to all nodes.
Use a queue to keep track of nodes to be burnt next.
Increment time for each level of nodes burnt until the entire tree is burnt.
Q8. What are Data Structures? What is the difference between array and linked list? What is the difference between linear and non-linear data structure? What is the difference between stack and queue with examples....
read moreData structures are ways to organize and store data for efficient access and modification.
Data structures include arrays, linked lists, stacks, queues, trees, and graphs.
Arrays are fixed-size, contiguous memory locations; linked lists are dynamic and consist of nodes.
Linear data structures (like arrays and linked lists) have a sequential relationship; non-linear (like trees and graphs) do not.
Stacks follow Last In First Out (LIFO) principle (e.g., browser history); queues fol...read more
Q9. What is Oops? What is the difference between Abstaction and Encapsulation? What is the difference between virtual fucntion and interface? What is polymorphism? What is the difference between exception and error...
read moreOOP is a programming paradigm based on objects, encapsulating data and behavior, enhancing modularity and reusability.
OOP stands for Object-Oriented Programming, focusing on objects that combine data and methods.
Abstraction hides complex implementation details, while encapsulation restricts access to certain components.
A virtual function is a member function in a base class that you can override in a derived class; an interface is a contract for classes to implement.
Polymorph...read more
Q10. Design of algorithms and puzzles and DBMS
Designing algorithms and puzzles requires creativity and logical thinking. DBMS knowledge is essential for efficient data management.
Algorithm design involves breaking down complex problems into smaller, manageable steps.
Puzzle design requires creativity and the ability to think outside the box.
DBMS knowledge is essential for efficient data management and retrieval.
Understanding data structures and algorithms is crucial for designing efficient DBMS systems.
Q11. How many times we can subtract 10 from 100?
You can subtract 10 from 100 ten times.
Subtract 10 from 100 once to get 90.
Subtract 10 from 90 to get 80.
Repeat this process until you reach 0.
You can subtract 10 from 100 ten times in total.
Q12. What is Oops? Difference between struct and union. Difference betwen Abstraction and Encapsulation.
OOP is a programming paradigm based on objects, enabling abstraction, encapsulation, inheritance, and polymorphism.
OOP stands for Object-Oriented Programming, focusing on objects that combine data and behavior.
Structs are value types, while unions can store different data types but only one at a time.
Abstraction hides complex implementation details, while encapsulation restricts access to certain components.
Example of struct: 'struct Point { int x; int y; };'. Example of unio...read more
Q13. Valid parenthesis (all approaches ) time and space complexity and past projects.
Valid parenthesis time and space complexity and past projects
Approaches for checking valid parenthesis include using a stack or recursion
Time complexity for stack approach is O(n) and space complexity is O(n)
Time complexity for recursion approach is O(2^n) and space complexity is O(n)
Past projects may include developing algorithms for string manipulation or parsing
Q14. What is class ,object and differentiationthem
A class is a blueprint for creating objects, which are instances of a class. Objects are instances of a class with specific attributes and behaviors.
Class: Blueprint for creating objects
Object: Instance of a class with specific attributes and behaviors
Differentiation: Class is like a template, object is a specific instance of that template
Q15. find duplicate numbers, prime num er program
Program to find duplicate numbers and prime numbers in an array of strings.
Iterate through the array to find duplicate numbers using a hashmap or set.
Check each number in the array for primality using a function that checks divisibility.
Store the duplicate numbers and prime numbers in separate arrays for further processing.
Q16. Pillars of oops
Pillars of OOPs include Inheritance, Encapsulation, Abstraction, and Polymorphism.
Inheritance: Allows a class to inherit properties and behavior from another class.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Abstraction: Hiding the complex implementation details and showing only the necessary features of an object.
Polymorphism: Ability of an object to take on many forms.
Q17. Naive algorithm
Naive algorithm is a simple approach to solving a problem without considering efficiency.
Naive algorithms are straightforward and easy to implement.
They may not be the most efficient solution for complex problems.
Examples include linear search for finding an element in an array and bubble sort for sorting elements.
Q18. ACID Properties
ACID properties are a set of properties that guarantee database transactions are processed reliably.
ACID stands for Atomicity, Consistency, Isolation, Durability
Atomicity ensures that all operations in a transaction are completed successfully or none at all
Consistency ensures that the database remains in a consistent state before and after the transaction
Isolation ensures that transactions are independent of each other
Durability ensures that once a transaction is committed, i...read more
More about working at HexaView Technologies

Interview Process at HexaView Technologies

Top Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

