Premium Employer

Info Edge

3.9
based on 2k Reviews
Filter interviews by

Onmood9 Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Find Magic Index in Sorted Array

Given a sorted array A consisting of N integers, your task is to find the magic index in the given array, where the magic index is defined as an index i such that A[i] = i.

Exam...read more

Ans.

Find the magic index in a sorted array where A[i] = i.

  • Iterate through the array and check if A[i] = i for each index i.

  • Since the array is sorted, you can optimize the search using binary search.

  • Return the index if found, else return -1.

Add your answer

Q2. Triplets with Given Sum Problem

Given an array or list ARR consisting of N integers, your task is to identify all distinct triplets within the array that sum up to a specified number K.

Explanation:

A triplet i...read more

Ans.

The task is to identify all distinct triplets within an array that sum up to a specified number.

  • Iterate through the array and use nested loops to find all possible triplets.

  • Check if the sum of the triplet equals the specified number.

  • Print the valid triplets or return -1 if no such triplet exists.

Add your answer

Q3. Matching Prefix Problem Statement

Given an integer N representing the number of strings in an array Arr composed of lowercase English alphabets, determine a string S of length N such that it can be used to dele...read more

Ans.

Given an array of strings, find the lexicographically smallest string that can be used as a prefix to minimize the total cost of deleting prefixes from the strings.

  • Iterate through the array to find the common prefix among all strings

  • Choose the lexicographically smallest common prefix

  • Delete the common prefix from each string in the array to minimize the total cost

Add your answer

Q4. Alien Dictionary Problem Statement

You are provided with a sorted dictionary (by lexical order) in an alien language. Your task is to determine the character order of the alien language from this dictionary. Th...read more

Ans.

Given a sorted alien dictionary in an array of strings, determine the character order of the alien language.

  • Iterate through the words in the dictionary to build a graph of character dependencies.

  • Perform a topological sort on the graph to determine the character order.

  • Return the character array representing the order of characters in the alien language.

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

Q5. Jumping Numbers Problem Statement

Given a positive integer N, your goal is to find all the Jumping Numbers that are smaller than or equal to N.

A Jumping Number is one where every adjacent digit has an absolute...read more

Ans.

Find all Jumping Numbers smaller than or equal to a given positive integer N.

  • Iterate through numbers from 0 to N and check if each number is a Jumping Number.

  • For each number, check if the absolute difference between adjacent digits is 1.

  • Include all single-digit numbers as Jumping Numbers.

  • Output the list of Jumping Numbers that are smaller than or equal to N.

Add your answer

Q6. react lifecycle in functional components

Ans.

React lifecycle in functional components

  • useEffect hook replaces lifecycle methods

  • useEffect runs after every render by default

  • useEffect can be controlled by dependencies array

  • useEffect cleanup function can be used to clean up effects

  • useLayoutEffect hook runs synchronously after DOM mutations

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

Interview Process at Onmood9

based on 1 interviews
Interview experience
3.0
Average
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Front end Developer Interview Questions from Similar Companies

3.7
 • 22 Interview Questions
3.8
 • 15 Interview Questions
3.8
 • 15 Interview Questions
3.5
 • 14 Interview Questions
3.5
 • 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