Gartner interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Gartner
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Practice coding from Leetcode, Interview bit, at least 100 questions 
Tip 2 : Practice any one automation framework includes design patterns

Application process
Where: Referral
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Restrict your resume to 1 page and write your practical work only
Tip 2 : Mention top topics like Selenium, Rest Assured Automation, Language used Java etc

Interview rounds

01
Round
Easy
Video Call
Duration45 minutes
Interview date3 Oct 2022
Coding problem2

1. Minimize the Maximum

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

You are given an array of N integers and an integer K. For each array element, you are allowed to increase or decrease it by a value k. The task is to minimize the difference between the maximum element and the minimum element after modifications.

Problem approach

You are given an array of N integers and an integer K. For each array element, you are allowed to increase or decrease it by a value k. The task is to minimize the difference between the maximum element and the minimum element after modifications.
Input Format :
The first line of input contains a single integer T, representing the number of test cases or queries to be run.

Then the test cases follow.

The first line of each test case contains a positive integer N which represents the number of elements of an array.

The Second line of each test case contains N integers denoting the elements of the array.

The third line of each test case contains a positive integer K.

Try solving now

2. Minimum Number of Platform Needed

Easy
23m average time
85% success
0/40
Asked in companies
Thought WorksGoldman SachsIntuit

You are given the arrival and departure times of N trains at a railway station in a day. You need to find the minimum of platforms required for the railway station such that no train waits i.e No train should wait for the platform to be clear or free.

Problem approach

You are given the arrival and departure times of N trains at a railway station in a day. You need to find the minimum of platforms required for the railway station such that no train waits i.e No train should wait for the platform to be clear or free.
Input Format :
The first line of input contains a single integer T, representing the number of test cases or queries to be run. 
Then the T test cases follow.

The first line of each test case contains a positive integer N which represents the number of trains that arrive at the railway station in a day.

The Second line of each test case contains N integers denoting the arrival time of all the trains.

The third line of each test case contains N integers denoting the departure time of all the trains.

Try solving now
02
Round
Easy
Video Call
Duration45 minutes
Interview date3 Oct 2022
Coding problem2

1. Best Time to Buy and Sell

Moderate
20m average time
80% success
0/80
Asked in companies
Natwest GroupMakeMyTripGartner

You are given an array(PRICES) of stock prices for N consecutive days. Your task is to find the maximum profit that you can make by completing as many transactions as you like, where a transaction denotes buying one and selling one share of the stock.

Note:

You must sell the stock before you buy it again.
Problem approach

You are given an array(PRICES) of stock prices for N consecutive days. Your task is to find the maximum profit that you can make by completing as many transactions as you like, where a transaction denotes buying one and selling one share of the stock.

Try solving now

2. Two and Four Wheeler Roads

Hard
48m average time
0/120
Asked in companies
Goldman SachsGartnerWells Fargo

There is a country with 'N' cities and 'M' bidirectional roads of 3 types.

Type 1: Two Wheeler Road, It means only vehicles having two wheels can use this road.
Type 2: Four Wheeler Road, It means only vehicles having four wheels can use this road.
Type 3: Both two and four Wheeler Road, It means this road can be used by both type of vehicles.

The problem is to find the maximum number of roads that can be removed such that a path exists for every pair of cities for each two-wheeler and four-wheeler vehicle.

Note:
1. Roads may form a cycle.

2. The cities do not have multiple same roads i.e all the roads are unique.

3. If every city cannot be reached, then return -1.
Problem approach

There is a country with 'N' cities and 'M' bidirectional roads of 3 types.
Type 1: Two Wheeler Road, It means only vehicles having two wheels can use this road.
Type 2: Four Wheeler Road, It means only vehicles having four wheels can use this road.
Type 3: Both two and four Wheeler Road, It means this road can be used by both type of vehicles.
The problem is to find the maximum number of roads that can be removed such that a path exists for every pair of cities for each two-wheeler and four-wheeler vehicle.
Note:
1. Roads may form a cycle.

2. The cities do not have multiple same roads i.e all the roads are unique.

3. If every city cannot be reached, then return -1.

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
SDE - 1
2 rounds | 3 problems
Interviewed by Gartner
742 views
0 comments
0 upvotes
SDE - 1
2 rounds | 3 problems
Interviewed by Gartner
1081 views
0 comments
0 upvotes
SDE - 1
3 rounds | 4 problems
Interviewed by Gartner
1277 views
0 comments
0 upvotes
SDE - 1
3 rounds | 8 problems
Interviewed by Gartner
1275 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
6262 views
3 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by BNY Mellon
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by CIS - Cyber Infrastructure
2160 views
0 comments
0 upvotes