Add office photos
Engaged Employer

Nagarro

4.0
based on 4.1k Reviews
Video summary
Filter interviews by

10+ Singapore Marriott Tang Plaza Hotel Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Check If Binary Representation of a Number is Palindrome

Given an integer N, determine if its binary representation is a palindrome.

Input:

The first line contains a single integer ‘T’ representing the number o...read more
Ans.

Check if the binary representation of a number is a palindrome.

  • Convert the integer to binary representation.

  • Check if the binary representation is a palindrome by comparing it with its reverse.

  • Return true if it is a palindrome, false otherwise.

Add your answer

Q2. Sort 0 and 1 Problem Statement

Given an integer array ARR of size N containing only integers 0 and 1, implement a function to sort this array. The solution should scan the array only once without using any addi...read more

Ans.

Sort an array of 0s and 1s in linear time without using additional arrays.

  • Use two pointers approach to swap 0s to the left and 1s to the right.

  • Maintain two pointers, one for 0s and one for 1s, and iterate through the array.

  • Swap elements at the two pointers based on the values encountered.

  • Continue until the two pointers meet in the middle of the array.

Add your answer

Q3. String Rotation Problem Statement

You are given a string named str and an integer D. Your task is to perform both left (anticlockwise) and right (clockwise) rotations on the given string by D units, starting fr...read more

Ans.

Implement left and right string rotations by D units on a given string.

  • Implement leftRotate() function to return string after left rotation by D units.

  • Implement rightRotate() function to return string after right rotation by D units.

  • Consider handling edge cases like empty string or D exceeding string length.

  • Example: For input 'coding', D=2, leftRotate() should return 'dingco' and rightRotate() should return 'ngcodi'.

Add your answer

Q4. Word Break Problem Statement

You are given a list of N strings called A. Your task is to determine whether you can form a given target string by combining one or more strings from A.

The strings from A can be u...read more

Ans.

Given a list of strings, determine if a target string can be formed by combining one or more strings from the list.

  • Iterate through all possible combinations of strings from the list to check if they can form the target string.

  • Use recursion to try different combinations of strings.

  • Keep track of the current position in the target string and the strings used so far.

  • Return true if the target string can be formed, false otherwise.

Add your answer
Discover Singapore Marriott Tang Plaza Hotel interview dos and don'ts from real experiences

Q5. Maximum Subarray Sum Problem Statement

Given an array arr of length N consisting of integers, find the sum of the subarray (including empty subarray) with the maximum sum among all subarrays.

Explanation:

A sub...read more

Ans.

Find the sum of the subarray with the maximum sum among all subarrays in an array of integers.

  • Use Kadane's algorithm to find the maximum subarray sum efficiently.

  • Initialize two variables, one for current sum and one for maximum sum.

  • Iterate through the array and update the current sum and maximum sum accordingly.

  • Return the maximum sum as the result.

Add your answer

Q6. Height of Binary Tree

You are provided with the Inorder and Level Order traversals of a Binary Tree composed of integers. Your goal is to determine the height of this Binary Tree without actually constructing i...read more

Ans.

Calculate the height of a Binary Tree given its Inorder and Level Order traversals without constructing it.

  • Use the properties of Inorder and Level Order traversals to determine the height of the Binary Tree.

  • The height of a Binary Tree is the number of edges on the longest path from the root to a leaf node.

  • Consider edge cases like a single node tree or empty tree when calculating the height.

Add your answer
Are these interview questions helpful?

Q7. Count Pairs with Given Sum

Given an integer array/list arr and an integer 'Sum', determine the total number of unique pairs in the array whose elements sum up to the given 'Sum'.

Input:

The first line contains ...read more
Ans.

Count the total number of unique pairs in an array whose elements sum up to a given value.

  • Use a hashmap to store the frequency of each element in the array.

  • Iterate through the array and for each element, check if (Sum - current element) exists in the hashmap.

  • Increment the count of pairs if the complement exists in the hashmap.

  • Divide the count by 2 to avoid counting duplicates (arr[i], arr[j]) and (arr[j], arr[i]) separately.

Add your answer

Q8. Common Elements Problem Statement

Identify and output the common strings present in both given arrays of lowercase alphabets for each test case.

Input:

The first line contains an integer 'T' representing the nu...read more
Ans.

The task is to find and output the common strings present in both given arrays of lowercase alphabets for each test case.

  • Iterate through the elements of the second array and check if they are present in the first array.

  • Use a hash set or map to efficiently check for common elements.

  • Return the common strings in the order they appear in the second array.

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

Q9. Median of Two Sorted Arrays

Given two sorted arrays A and B of sizes N and M, find the median of the merged array formed by combining arrays A and B. If the total number of elements, N + M, is even, the median ...read more

Ans.

Find the median of two sorted arrays by merging them and calculating the middle element(s).

  • Merge the two sorted arrays into one sorted array.

  • Calculate the median based on the total number of elements in the merged array.

  • If the total number of elements is even, take the mean of the two middle elements as the median.

Add your answer

Q10. Prime Numbers Identification

Given a positive integer N, your task is to identify all prime numbers less than or equal to N.

Explanation:

A prime number is a natural number greater than 1 that has no positive d...read more

Ans.

Identify all prime numbers less than or equal to a given positive integer N.

  • Iterate from 2 to N and check if each number is prime

  • Use the Sieve of Eratosthenes algorithm for efficient prime number identification

  • Optimize by only checking up to the square root of N for divisors

Add your answer

Q11. DFS Traversal Problem Statement

Given an undirected and disconnected graph G(V, E), where V is the number of vertices and E is the number of edges, the connections between vertices are provided in the 'GRAPH' m...read more

Ans.

DFS traversal to find connected components in an undirected and disconnected graph.

  • Use Depth First Search (DFS) algorithm to traverse the graph and find connected components.

  • Maintain a visited array to keep track of visited vertices.

  • For each unvisited vertex, perform DFS to explore all connected vertices and form a connected component.

Add your answer

More about working at Nagarro

#2 Best Large Company - 2022
#1 Best IT/ITES Company - 2022
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Singapore Marriott Tang Plaza Hotel

based on 2 interviews
2 Interview rounds
Coding Test Round
Video Call Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Intern Interview Questions from Similar Companies

4.1
 • 188 Interview Questions
4.4
 • 30 Interview Questions
3.8
 • 25 Interview Questions
4.0
 • 16 Interview Questions
4.2
 • 11 Interview Questions
3.7
 • 10 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
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