Add office photos
Employer?
Claim Account for FREE

Zopsmart Technology

3.1
based on 108 Reviews
Filter interviews by

20+ Drishti Institute of Hotel Management Interview Questions and Answers

Updated 22 Nov 2024
Q1. Find Indices For Local Minimas and Maximas

Given an array “arr” of “N” integers. Your task is to find and return all the indices of local minima and local maxima in the given array. You need to return the indice...read more

Ans.

The task is to find and return the indices of local minima and local maxima in the given array.

  • Iterate through the array and compare each element with its neighbors to determine if it is a local minima or maxima.

  • Consider corner elements separately by comparing them with only one neighbor.

  • Store the indices of local minima and maxima in separate lists.

  • If there are no local minima or maxima, return -1 as the only row element in the 2-D list.

View 1 answer
Q2. Check If One String Is A Rotation Of Another String

You are given two Strings 'P' and 'Q' of equal length. Your task is to check whether String 'P' can be converted into String 'Q' by cyclically rotating it to t...read more

Ans.

The task is to check if one string can be converted into another string by cyclically rotating it to the right any number of times.

  • Check if the lengths of the two strings are equal. If not, return 0.

  • Concatenate the first string with itself and check if the second string is a substring of the concatenated string.

  • If the second string is a substring, return 1. Otherwise, return 0.

View 2 more answers
Q3. Minimum Jumps

Bob lives with his wife in a city named Berland. Bob is a good husband, so he goes out with his wife every Friday to ‘Arcade’ mall.

‘Arcade’ is a very famous mall in Berland. It has a very unique t...read more

Ans.

This question asks for the minimum number of trampoline jumps a person needs to make in order to reach the last shop in a mall.

  • The shops in the mall are laid out in a straight line and each shop has a constant value representing the maximum distance it can be jumped to.

  • The person starts at shop 0 and wants to reach the last shop, shop N-1.

  • If it is impossible to reach the last shop, the function should return -1.

  • The function should take the number of test cases, the number of ...read more

View 4 more answers

Q4. Write a program to slice the array from given index and re-arrange the array without using extra variables, inbuilt methods

Ans.

Program to slice and rearrange array without extra variables or inbuilt methods

  • Use a loop to iterate through the array and shift elements to the left

  • Use a temporary variable to store the first element and move the rest of the elements one position to the left

  • Repeat the above step until the desired index is reached

  • Then move the temporary variable to the end of the sliced array

  • Continue shifting the remaining elements to the left until the end of the array is reached

View 1 answer
Discover Drishti Institute of Hotel Management interview dos and don'ts from real experiences

Q5. delete middle node of linked list

Ans.

To delete the middle node of a linked list, we can iterate through the list to find the middle node and then remove it by adjusting the pointers.

  • Iterate through the linked list to find the middle node by using two pointers - one moving one node at a time and the other moving two nodes at a time.

  • Once the middle node is found, adjust the pointers to skip over the middle node and connect the nodes before and after it.

  • Handle edge cases like when the list has an even number of nod...read more

Add your answer

Q6. SQL vs NoSQL and when to use what

Ans.

SQL is best for structured data, NoSQL for unstructured. Use SQL for complex queries, NoSQL for scalability and speed.

  • SQL is best for structured data, NoSQL for unstructured

  • Use SQL for complex queries, NoSQL for scalability and speed

  • SQL is ACID compliant, NoSQL is BASE

  • Examples of SQL: MySQL, Oracle, PostgreSQL

  • Examples of NoSQL: MongoDB, Cassandra, Redis

Add your answer
Are these interview questions helpful?

Q7. DB queries on finding the second largest element

Ans.

Query to find the second largest element in a database table

  • Use ORDER BY and LIMIT to select the second largest element

  • For MySQL: SELECT column FROM table ORDER BY column DESC LIMIT 1,1

  • For Oracle: SELECT column FROM (SELECT column FROM table ORDER BY column DESC) WHERE ROWNUM <= 2 MINUS SELECT column FROM (SELECT column FROM table ORDER BY column DESC) WHERE ROWNUM <= 1

Add your answer

Q8. What is launch modes in android

Ans.

Launch modes determine how a new instance of an activity is associated with the current task.

  • There are four launch modes: standard, singleTop, singleTask, and singleInstance.

  • Standard is the default mode and creates a new instance of the activity every time it is launched.

  • SingleTop mode checks if there is already an instance of the activity at the top of the task stack and reuses it if possible.

  • SingleTask mode creates a new task for the activity and places it at the root of th...read more

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. Linkedlist insertion &amp; deletion in Go

Ans.

Linkedlist insertion & deletion in Go

  • In Go, linked lists can be implemented using structs and pointers.

  • Insertion involves creating a new node and updating the pointers of adjacent nodes.

  • Deletion involves updating the pointers of adjacent nodes to bypass the node being deleted.

  • Go's garbage collector automatically frees memory of unused nodes.

Add your answer

Q10. What is the keyword used in interface if we want concreate method?

Ans.

The keyword used in interface for concrete method is 'default'.

  • The 'default' keyword is used in interfaces to provide a default implementation for a method.

  • It allows interfaces to have concrete methods without requiring implementing classes to override them.

  • Example: 'default void methodName() { // method implementation }'

Add your answer

Q11. Design patterns in java

Ans.

Design patterns in Java are reusable solutions to common problems in software design.

  • Design patterns help in creating flexible, maintainable, and scalable code.

  • Some common design patterns in Java include Singleton, Factory, Observer, and Strategy.

  • Each design pattern has its own purpose and can be applied in different scenarios.

  • Design patterns promote code reusability and help in organizing code in a structured manner.

Add your answer

Q12. Can we create object for abstract classes and interfaces?

Ans.

Yes, we can create object for abstract classes and interfaces in Java.

  • Objects cannot be created for abstract classes directly, but can be created for concrete subclasses that extend the abstract class.

  • Interfaces cannot be instantiated, but objects can be created for classes that implement the interface.

  • Example: Abstract class Animal { abstract void makeSound(); } Class Dog extends Animal { void makeSound() { System.out.println('Bark'); } } Animal obj = new Dog();

  • Example: Inte...read more

Add your answer
Asked in
SDE Interview

Q13. first and last occurrence of an element in a sorted array

Ans.

Find the first and last occurrence of an element in a sorted array.

  • Use binary search to find the first occurrence of the element.

  • Modify binary search to find the last occurrence of the element.

  • Handle cases where the element is not found in the array.

Add your answer

Q14. What is inline function

Ans.

Inline function is a function that is expanded in line when it is called, rather than calling a separate function.

  • Inline functions are used to improve performance by reducing the overhead of function calls.

  • They are defined using the 'inline' keyword.

  • They are commonly used in C++ programming.

  • Example: inline int add(int a, int b) { return a + b; }

Add your answer

Q15. What is the job culture of zopsmart

Ans.

The job culture at Zopsmart is collaborative, innovative, and fast-paced.

  • Collaborative work environment where team members support and help each other

  • Emphasis on innovation and creativity in problem-solving

  • Fast-paced atmosphere with opportunities for growth and learning

  • Open communication and feedback encouraged

  • Diverse and inclusive workplace culture

Add your answer

Q16. What is use of factory

Ans.

A factory is used to create objects of a specific class without exposing the creation logic to the client.

  • Factories provide a way to create objects without exposing the creation logic to the client.

  • They can be used to create objects of a specific class or a group of related classes.

  • Factories can be used to implement the Singleton pattern, where only one instance of a class is created.

  • They can also be used to implement the Abstract Factory pattern, where a family of related ob...read more

Add your answer

Q17. What is string contant pool?

Ans.

String constant pool is a memory area in Java where unique string literals are stored to optimize memory usage.

  • String constant pool is a part of the Java heap memory.

  • It stores unique string literals to avoid duplicate storage.

  • Strings created using double quotes are stored in the string constant pool.

  • Strings created using new keyword are stored in the heap memory.

Add your answer
Asked in
SDE Interview

Q18. What is oops concepts

Ans.

Object-oriented programming concepts that focus on data encapsulation, inheritance, polymorphism, and abstraction.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit (class).

  • Inheritance: Ability of a class to inherit properties and behavior from another class.

  • Polymorphism: Ability to present the same interface for different data types.

  • Abstraction: Hiding the complex implementation details and showing only the necessary features to the outside ...read more

Add your answer

Q19. Detect loop in a linkedlist

Ans.

Use Floyd's Tortoise and Hare algorithm to detect loop in a linked list.

  • Initialize two pointers, slow and fast, at the head of the linked list.

  • Move slow pointer by one step and fast pointer by two steps.

  • If they meet at any point, there is a loop in the linked list.

Add your answer

Q20. SQL query for fetching some info

Ans.

SQL query to fetch specific information from a database

  • Use SELECT statement to specify the columns you want to retrieve

  • Use FROM clause to specify the table from which to retrieve the data

  • Use WHERE clause to add conditions for filtering the data

  • Use JOIN clause to combine data from multiple tables if needed

Add your answer

Q21. What is cross join

Ans.

Cross join is a type of join operation in SQL that returns the Cartesian product of two tables.

  • Cross join does not require any matching condition between the tables.

  • It combines each row from the first table with every row from the second table.

  • Cross join can result in a large number of rows if the tables are big.

  • Example: SELECT * FROM table1 CROSS JOIN table2;

Add your answer

Q22. Find middle element of linked list

Ans.

To find the middle element of a linked list, use the slow and fast pointer technique.

  • Initialize two pointers, slow and fast, at the head of the linked list.

  • Move the slow pointer by one node and the fast pointer by two nodes until the fast pointer reaches the end of the list.

  • The node pointed to by the slow pointer at this point will be the middle element of the linked list.

Add your answer

Q23. Inner join of three tables

Ans.

Inner join of three tables in SQL

  • Use the JOIN keyword to combine three tables based on a common column

  • Specify the columns to select from each table

  • Use the ON keyword to specify the join condition

Add your answer
Asked in
SDE Interview

Q24. reverse a string

Ans.

Reverse a string by iterating through the characters and swapping them.

  • Create a new string to store the reversed string

  • Iterate through the original string from end to start

  • Append each character to the new string

  • Return the new string as the reversed string

Add your answer

Q25. Last F2F round .

Ans.

The last face-to-face round of the interview process.

  • Prepare to discuss your experience and skills in more detail.

  • Be ready to answer any final questions the interviewer may have.

  • Show enthusiasm and interest in the position and company.

  • Ask about next steps in the hiring process.

  • Thank the interviewer for the opportunity.

Add your answer

Q26. Explain acid properties

Ans.

ACID properties are a set of properties that guarantee database transactions are processed reliably.

  • ACID stands for Atomicity, Consistency, Isolation, Durability

  • Atomicity ensures that either all operations in a transaction are completed or none are

  • Consistency ensures that the database remains in a consistent state before and after the transaction

  • Isolation ensures that multiple transactions can be executed concurrently without affecting each other

  • Durability ensures that once a...read more

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

Interview Process at Drishti Institute of Hotel Management

based on 40 interviews in the last 1 year
Interview experience
3.9
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.8
 • 204 Interview Questions
3.9
 • 174 Interview Questions
3.9
 • 169 Interview Questions
3.9
 • 135 Interview Questions
4.0
 • 133 Interview Questions
View all
Top Zopsmart Technology 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
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

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