Add office photos
Engaged Employer

Cadence Design Systems

4.1
based on 268 Reviews
Filter interviews by

IRT Securitas Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

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 more
Ans.

Divide 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.

View 1 answer

Q2. What is the difference between C++ and Objective C and where will you use it?

Ans.

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

Add your answer

Q3. What is the difference between class container and class composition?

Ans.

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

Add your answer

Q4. What is a malloc function and where is it used and how is it different from new

Ans.

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

Add your answer
Discover IRT Securitas interview dos and don'ts from real experiences

Q5. How will you calculate the width of the tree?

Ans.

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

View 1 answer

Q6. What is the width of a tree?

Ans.

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.

View 1 answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Engineer II Interview Questions from Similar Companies

3.9
 • 14 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter