Add office photos
Employer?
Claim Account for FREE

Microsoft Corporation

4.0
based on 1.7k Reviews
Video summary
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

Glic Tech Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Given a 2 dim array, find an element which is the maximum in its column and minimum in its row. You are assured that atleast one such element exists. You may return any one if multiple such elements exist. Writ...

read more
Ans.

Find element in 2D array which is max in column and min in row with minimum comparisons

  • Iterate over rows and columns to find max and min elements respectively

  • Compare the max element of a column with the min element of its row

  • Return the element if it satisfies the condition

  • Consider edge cases like multiple elements satisfying the condition

Add your answer

Q2. Design an elevator system, where there are 5 elevators and 50 floors. What would be the design considerations on which elevator should come when a button is pressed on a given floor?

Ans.

Design considerations for an elevator system with 5 elevators and 50 floors.

  • Traffic patterns and peak hours should be analyzed to determine the optimal number of elevators to be in operation at any given time.

  • Elevators should be programmed to prioritize stops based on the direction of travel and the proximity of the requested floor to the elevator's current location.

  • The system should be designed to minimize wait times and maximize efficiency.

  • Safety features such as emergency ...read more

Add your answer

Q3. Given a binary tree (not necessarily complete), connect a node to the node to its right (at the same level). Assume you have an extra pointer in the node to perform the connection

Ans.

Connect nodes to their right in a binary tree using an extra pointer.

  • Traverse the tree using level order traversal

  • For each node, connect its right child to the next node in the level

  • If there is no next node, set the right child to null

Add your answer

Q4. Given an array, find if it contains a majority element. An element is a majority element if it occurs more than 50% of times. Do it in O(n)

Ans.

Find if an array has a majority element in O(n)

  • Iterate through the array and keep track of the count of each element

  • If the count of any element is greater than half the length of the array, return true

  • Otherwise, return false

Add your answer
Discover Glic Tech interview dos and don'ts from real experiences

Q5. Given two linked lists, find if they have a common node

Ans.

Given two linked lists, check if they have a common node.

  • Traverse both lists and compare each node's memory address

  • Use a hash table to store memory addresses of nodes in one list and check for matches in the other list

  • If one list is shorter, traverse it first and then start traversing the longer list from the difference in length

Add your answer

Q6. Given an array of numbers, return the same array containing only unique elements in the array

Ans.

Return an array with only unique elements

  • Use a Set to store unique elements

  • Loop through the array and add each element to the Set

  • Convert the Set back to an array and return it

Add your answer

More about working at Microsoft Corporation

Top Rated Internet/Product Company - 2024
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 Developer Interview Questions from Similar Companies

3.7
 • 30 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