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

Technical Consulting Engineer

HackerRank
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 5 months
Topics: OOPS, System Design, Algorithms, Data Structures, DBMS
Tip
Tip

Tip 1 : Prepare System Design
Tip 2 : Practice DSA Questions properly
Tip 3 : Practice OOPS and DBMS Concepts

Application process
Where: Referral
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1 : Your Resume should consist mainly of skills, projects, and achievements. Projects would play a crucial part in your interview and you should have at least one most relevant and good project that shows how strong your concepts are in development.
Tip 2 : The most important tip is that never lie on your resume If you have worked upon some technology for the project part only and don't know the proper depth you could write basics only in your resume.

Interview rounds

01
Round
Easy
Online Coding Test
Duration90 minutes
Interview date5 May 2021
Coding problem3

This round had 3 coding question ranging from easy - medium difficulty so was able to complete them pretty quickly.

1. Single Element in a Sorted Array

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

You are given a sorted array ‘arr’ of ‘n’ numbers such that every number occurred twice in the array except one, which appears only once.


Return the number that appears once.


Example:
Input: 'arr' = [1,1,2,2,4,5,5]

Output: 4 

Explanation: 
Number 4 only appears once the array.


Note :
Exactly one number in the array 'arr' appears once.


Problem approach

Take the first number, then find its last occurrence or upper bound using binary search.
Then count it as one unique element.
Place pointer to next different element and repeat the same step.

Try solving now

2. Wildcard Pattern Matching

Hard
50m average time
30% success
0/120
Asked in companies
FreshworksWalmartSamsung R&D Institute

Given a text and a wildcard pattern of size N and M respectively, implement a wildcard pattern matching algorithm that finds if the wildcard pattern is matched with the text. The matching should cover the entire text not partial text.

The wildcard pattern can include the characters ‘?’ and ‘*’

 ‘?’ – matches any single character 
 ‘*’ – Matches any sequence of characters(sequence can be of length 0 or more)
Problem approach

Case 1: The character is ‘*’ . Here two cases arises as follows: 

We can ignore ‘*’ character and move to next character in the Pattern.
‘*’ character matches with one or more characters in Text. Here we will move to next character in the string.
Case 2: The character is ‘?’ 
We can ignore current character in Text and move to next character in the Pattern and Text.

Case 3: The character is not a wildcard character 
If current character in Text matches with current character in Pattern, we move to next character in the Pattern and Text. If they do not match, wildcard pattern and Text do not match.

Try solving now

3. Remove String

Moderate
35m average time
60% success
0/80
Asked in companies
OpenTextAmazonSamsung

You have been given a linked list where each node has a single character. You have also been given a string 'STR'.

You have to remove all the occurrences of string STR from the linked list.

Note:
1. Start checking from the end of the linked list and not from the beginning. For example, if the linked list is ( a, b, a ,b, a)  and the string is equal to “aba” , then the answer should be (a b), not (b a).

2. After removing an occurrence check again for new formations.
Problem approach

We make a copy of our string s (x in code) and then iterate over the string s.
Now in the current iteration if j is greater than or equal to m that means that we have seen at least m elements, so we can check whether the substring of last m characters is equal to part or not. If it is equal, we reduce the variable 'j' by m showing that we have removed this substring and now we will overwrite the characters from index j.
Finally we will return the substring of x of length j.

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date2 Jun 2021
Coding problem1

This round was take by a senior engineer who asked a lot of questions on resume, oops, tech stack used, why a particular thing is used in project, what could be alternatives to that and one system design question as well.

1. System Design

Design a URL Shortener

Problem approach

Tip 1 : Prepare for these questions as well as generally they not asked for intern position but you never know.
Tip 2 : Explain the approach before moving to solution.
Tip 3 : Keep the interviewer engaged.

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
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4657 views
0 comments
0 upvotes
company logo
Intern
2 rounds | 2 problems
Interviewed by HackerRank
2122 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 3 problems
Interviewed by HackerRank
1687 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3452 views
0 comments
0 upvotes