Flipkart Interview Question for SDE1s
- 0of 0 votes
AnswersGiven a list of sentences and a list of phrases. The task is to find which sentence(s) contain all the words in a phrase and for every phrase print the sentences number that contains the given phrase.
- Rising star August 07, 2019 in India
Constraint: A word cannot be a part of more than 10 sentences.
Examples:
Input:
Sentences:
1. Strings are an array of characters.
2. Sentences are an array of words.
Phrases:
1. an array of
2. sentences are strings
Output:
Phrase1 is present in sentences: 1,2
Phrase2 is present in sentences: None
Since each word in phrase 1 exists in both the sentences,
but all the words in second phrase do not exist in either.| Report Duplicate | Flag | PURGE
Flipkart SDE1 Algorithm
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
Interview Type: Written Test
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
Open Chat in New Window
Open Chat in New Window