Add office photos
Employer?
Claim Account for FREE

Engati

2.4
based on 31 Reviews
Filter interviews by

EMPIRE INFORMATION AND INFRASTRUCTURE Interview Questions and Answers

Updated 17 May 2024

Q1. Largest element in an array without using any stl functions

Ans.

Find the largest element in an array without using any STL functions.

  • Iterate through the array and compare each element with the current largest element.

  • Update the largest element if a larger element is found.

  • Return the largest element at the end.

Add your answer

Q2. Implementing queue from2 stacks

Ans.

Implement a queue using two stacks

  • Use two stacks - one for enqueue operation and one for dequeue operation

  • When dequeue is called, check if the second stack is empty. If it is, pop all elements from the first stack and push them onto the second stack

  • Time complexity for enqueue operation is O(1) and for dequeue operation is O(n)

Add your answer

Q3. 3 ants on a triangle puzzle

Ans.

Three ants are placed at the corners of an equilateral triangle. Each ant randomly picks a direction and starts moving. What is the probability that they do not collide?

  • Calculate the probability of each ant moving in a different direction (1/3 * 1/3 * 1/3 = 1/27)

  • Calculate the probability of each ant moving in the same direction (1/3)

  • Subtract the probability of colliding (1/27) from 1 to get the probability of not colliding (26/27)

Add your answer

Q4. Reverse a string

Ans.

Reverse a given string

  • Use a loop to iterate through the characters of the string and build a new string in reverse order

  • Alternatively, you can use built-in functions like reverse() or StringBuilder in some programming languages

  • Make sure to handle edge cases like empty string or null input

Add your answer
Discover EMPIRE INFORMATION AND INFRASTRUCTURE interview dos and don'ts from real experiences

Q5. What is AI, what do you know about chatbots

Ans.

AI stands for Artificial Intelligence, chatbots are AI-powered programs that simulate conversation with users.

  • AI is the simulation of human intelligence processes by machines, typically computer systems.

  • Chatbots are AI-powered programs that can simulate conversation with users through text or voice.

  • Chatbots are commonly used in customer service, marketing, and other business applications.

  • Examples of chatbots include Siri, Alexa, and customer service chatbots on websites.

Add your answer

Q6. Mover zeros to the lend of the array without changing the order

Ans.

Move zeros to the end of the array without changing the order.

  • Iterate through the array and count the number of zeros

  • Create a new array with all the non-zero elements

  • Append the counted number of zeros at the end of the new array

Add your answer

Q7. Find second smallest element in the array

Ans.

The second smallest element in an array is found by sorting the array and selecting the element at index 1.

  • Sort the array in ascending order

  • Access the element at index 1 to get the second smallest element

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at EMPIRE INFORMATION AND INFRASTRUCTURE

based on 17 interviews
Interview experience
2.8
Poor
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.7
 • 3.1k Interview Questions
3.7
 • 403 Interview Questions
3.4
 • 282 Interview Questions
3.7
 • 278 Interview Questions
3.9
 • 209 Interview Questions
3.3
 • 138 Interview Questions
View all
Top Engati Interview Questions And Answers
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
75 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