Genpact private limited interview experience Real time questions & tips from candidates to crack your interview

Software Consultant

Genpact private limited
upvote
share-icon
2 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 months
Topics: Java 8, Spring, Angular, Data Structures, Pointers, OOPS, System Design, Algorithms
Tip
Tip

Tip 1 : Coding practice 
Tip 2 : Project Details 
Tip 3 : New technology details

Application process
Where: Campus
Eligibility: 7 CGPA
Resume Tip
Resume tip

Tip 1 : Have some project details 
Tip 2 : Positive things on your resume

Interview rounds

01
Round
Easy
Online Coding Interview
Duration60 minutes
Interview date6 Jan 2022
Coding problem1

1. Most Frequent Word

Easy
15m average time
85% success
0/40
Asked in companies
AtlassianAmazonHackerEarth

You are given two strings 'A' and 'B' of words. Your task is to find out the most frequent and lexicographically smallest word in string 'A', which is not present in string 'B'. If no such word is present in 'A', then return -1.

Note:

1. A word is a sequence of one or more lowercase characters.

2. Words are separated by a single whitespace character.
Example:
For the given string 'A' = “coding ninjas coding ninjas” and 'B' = “data structures and algorithms”, so both the word 'coding' and 'ninjas' are not present in string 'B' and occur two times each, but the word “coding” is lexicographically smaller than the word “ninjas”. So the answer is “coding”.
Problem approach

Using hash map in Java 8

Try solving now
02
Round
Easy
Online Coding Interview
Duration60 minutes
Interview date13 Jan 2022
Coding problem1

1. Count frequency of words in a string

Moderate
20m average time
80% success
0/80
Asked in companies
MicrosoftHCL TechnologiesGoldman Sachs

Ninja and his friend playing a game in which his friend gave him a string ‘STR’ that can contain spaces and a List/Array ‘WORDS’ which is of type string containing ‘N’ strings of words. Ninja’s task is to count the occurrences of all the words in ‘STR’.

For Example:

‘STR’ = “i am a Ninja”, ‘N’ = 3 and ‘WORDS[]’ = [“Ninja”,”a”,”am”]. Then the output should be [1,1,1]. Because the occurrence of “Ninja” in ‘STR’ is 1 and the occurrence of “a” in ‘STR’ is 1.Similarly occurrence of “am” is 1.

Note:

The output should be in the same order as given in ‘WORDS’.

Can you help Ninja to generate all valid strings from ‘STR’ by minimum removals?

Problem approach

Using Hash map

Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
Frontend Developer
3 rounds | 7 problems
Interviewed by Genpact private limited
1729 views
0 comments
0 upvotes
Senior Software Engineer
3 rounds | 7 problems
Interviewed by Genpact private limited
1563 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
8518 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
3320 views
0 comments
0 upvotes