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

SDE - 1

Gartner
upvote
share-icon
2 rounds | 3 Coding problems

Interview preparation journey

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

Tip 1 : OOPS - You should be well versed with basic OOPS principles
Tip 2 : You should be confident and have profound knowledge about the projects you worked on
Tip 3 : Basic DB concepts like joins, normalisation

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

Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.

Interview rounds

01
Round
Easy
Video Call
Duration45 mins
Interview date29 Jan 2022
Coding problem2

1. Delete Kth node From End

Moderate
15m average time
95% success
0/80
Asked in companies
WalmartWells FargoChegg Inc.

You have been given a singly Linked List of 'N' nodes with integer data and an integer 'K'.


Your task is to remove the 'K'th node from the end of the given Linked List and return the head of the modified linked list.


Example:
Input : 1 -> 2 -> 3 -> 4 -> 'NULL'  and  'K' = 2
Output: 1 -> 2 -> 4 -> 'NULL'
Explanation:
After removing the second node from the end, the linked list become 1 -> 2 -> 4 -> 'NULL'.

altImage


Problem approach

You have been given a singly Linked List of 'N' nodes with integer data and an integer 'K'. Your task is to remove the Kth node from the end of the given Linked List.

Try solving now

2. Puzzle

You have got someone working for you for five days and a gold bar to pay him. You must give them a piece of gold at the end of every day. What are the fewest number of cuts to the bar of gold that will allow you to pay him 1/5th each day?

Problem approach

Answer to this puzzle is 2 cut

02
Round
Hard
Video Call
Duration60 mins
Interview date29 Jan 2022
Coding problem1

1. LRU Cache Implementation.

Moderate
0/80
Asked in company
Gartner

Design a data structure that follows the concept of LRU i.e. Least Recently Used Cache.

LRU Cache Class implementation :
You are given a capacity ‘C’ for LRUCache(int capacity) which basically initializes the LRU cache with positive size capacity.

Then you are given a ‘KEY’ for which the function int get(int key) returns the value of the key if the key exists, otherwise, return -1.

You are given two integers ‘KEY’ and ‘VALUE’ for which the function void put(int key, int value) updates the value of the key if the key exists. Otherwise, add the key-value pair to the cache. If the number of keys exceeds the capacity from this operation, evict the least recently used key.
Problem approach

Design and implement a data structure for Least Recently Used (LRU) cache

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
6261 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
2159 views
0 comments
0 upvotes