NXP Semiconductors
HMSHost Interview Questions and Answers
Q1. City of Happy People Problem Statement
Imagine a city where the happiness of each resident is described by a numerical value. Ninja, who is visiting this city, is interested in forming groups of people such tha...read more
The problem is to find the number of ways to form a group of people such that the overall happiness of the group falls within a given range.
Iterate through all possible subsets of the given array/list
Calculate the sum of happiness values for each subset
Count the number of subsets whose sum falls within the given range
Q2. 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
The task is to implement a wildcard pattern matching algorithm that checks if a given wildcard pattern matches a given text.
The wildcard pattern can include the characters '?' and '*'
'?' matches any single character
'*' matches any sequence of characters (sequence can be of length 0 or more)
The matching should cover the entire text, not partial text
Implement a function that takes the wildcard pattern and the text as input and returns True if the text matches the pattern, False...read more
Q3. Types of Memory Allocations in C
Types of memory allocations in C include static, dynamic, and automatic.
Static memory allocation: memory is allocated at compile time and remains constant throughout the program's execution. Example: int x = 5;
Dynamic memory allocation: memory is allocated at runtime using functions like malloc() or calloc(). Example: int *ptr = (int*)malloc(sizeof(int));
Automatic memory allocation: memory is allocated on the stack and is automatically deallocated when the function scope ends...read more
Q4. Pointers in C - Types of pointers
Pointers in C are variables that store memory addresses. Types include null pointers, void pointers, function pointers, etc.
Null pointers: int *ptr = NULL;
Void pointers: void *ptr;
Function pointers: int (*ptr)(int, int);
Q5. Copy Constructor in cpp
Copy constructor in C++ is a special member function that creates a new object as a copy of an existing object.
Copy constructor is used to initialize a new object as a copy of an existing object.
It is invoked when a new object is created from an existing object.
Example: class MyClass { public: MyClass(const MyClass& obj) { // copy constructor logic } };
Example: MyClass obj1; MyClass obj2 = obj1; // copy constructor is invoked
Q6. Experience with Power BI
I have experience using Power BI to create interactive visualizations and analyze data.
Created interactive dashboards to track key performance indicators
Used Power Query to clean and transform data for analysis
Utilized DAX formulas to calculate metrics and create custom measures
Interview Process at HMSHost
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month