Cadence Design Systems
IRT Securitas Interview Questions and Answers
Q1. There are fifteen horses and a racing track that can run five horses at a time. You have to figure out the top 3 horses out of those and you don't have any timer machine to measure. How will you find the top 3...
read moreDivide the horses into groups of 5 and race them. Take the top 2 from each race and race them again. Finally, race the top 2 horses to determine the top 3.
Divide the horses into 3 groups of 5 and race them.
Take the top 2 horses from each race and race them again.
Finally, race the top 2 horses to determine the top 3.
Q2. What is the difference between C++ and Objective C and where will you use it?
C++ is a general-purpose programming language while Objective C is a superset of C used for iOS and macOS development.
C++ is widely used for developing applications, games, and system software.
Objective C is primarily used for iOS and macOS development.
C++ supports both procedural and object-oriented programming paradigms.
Objective C is an object-oriented language with dynamic runtime features.
C++ has a larger standard library compared to Objective C.
Objective C uses a Smallt...read more
Q3. What is the difference between class container and class composition?
Class container is a class that holds objects of other classes, while class composition is a way to combine multiple classes to create a new class.
Class container holds objects of other classes, acting as a collection or container.
Class composition combines multiple classes to create a new class with its own behavior and attributes.
In class container, the objects are typically stored in a data structure like an array or a list.
In class composition, the classes are combined by...read more
Q4. What is a malloc function and where is it used and how is it different from new
malloc is a function used in C programming to dynamically allocate memory. It is used in low-level programming and is different from new.
malloc is used to allocate memory on the heap in C programming.
It is used when the size of memory needed is not known at compile time.
malloc returns a void pointer to the allocated memory block.
Example: int* ptr = (int*) malloc(5 * sizeof(int));
new is used in C++ programming to dynamically allocate memory.
It is used with classes and objects ...read more
Q5. How will you calculate the width of the tree?
The width of a tree can be calculated by finding the maximum number of nodes at any level.
Traverse the tree level by level using breadth-first search
Keep track of the maximum number of nodes at any level
Return the maximum number of nodes as the width of the tree
Q6. What is the width of a tree?
The width of a tree refers to the maximum number of nodes at any level in the tree.
The width of a tree can be determined by traversing the tree level by level and counting the maximum number of nodes at any level.
The width of a tree can also be calculated using breadth-first search (BFS) algorithm.
The width of a tree is not related to the height or depth of the tree.
Top Software Engineer II Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month