Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Yellow.ai interview experience Real time questions & tips from candidates to crack your interview

SDE - 2

Yellow.ai
upvote
share-icon
3 rounds | 3 Coding problems

Interview preparation journey

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

Tip 1 : Prepare on DSA, practice regularly
Tip 2 : Concentrate on design
 

Application process
Where: Other
Eligibility: Product based company experience
Resume Tip
Resume tip

Tip 1 : Put in all projects
Tip 2 : Highlight impact

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date16 Mar 2022
Coding problem1

1. Count of Smaller Elements

Hard
45m average time
55% success
0/120
Asked in companies
AppleOYOAdobe

Given an array of size 'N' return the count array such that COUNT[i] equals the number of element which are smaller than ARR[ i ] on its the right side.

For Example : ARR = [4,2,1,5] the count array corresponding to the given array is :-.

The Number of elements smaller than 4 on its right side is 2.
The Number of elements smaller than 2 on its right side is 1.
The Number of elements smaller than 1 on its right side is 0.
The Number of elements smaller than 5 on its right side is 0.
Hence the count array is [2,1,0,0]
Problem approach

Sample data:
Input 1: arr[] = {12, 1, 2, 3, 0, 11, 4}
Output 1: countSmaller[] = {6, 1, 1, 1, 0, 1, 0}
Input 2: arr[] = {1, 2, 3, 4, 5}
Output 2: countSmaller[] = {0, 0, 0, 0, 0}

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date23 Mar 2022
Coding problem1

1. System Design Question

Notification Reminder for movie with Customizable time

APIs:
Create
Update
Delete
Read
Webhook
Reminder

Problem approach

Reminder
--------------
id
execution_time
created_time
updated_time
user_id
template_id
ticket_id

Ticket
--------




Template
------------
id
message
created_time
updated_time


User
-------
id
name
...


Logs
-------
timestamp
reminder_id


API:
Create:

{
execution_time: T+5:30,
template_id: “123”
}

Update:
{
id: “12”,
template_id: “1234”,
execution_time: T+5:30
}

Delete:
/ids=123

Read:
reminders/get

03
Round
Medium
Video Call
Duration90 minutes
Interview date30 Aug 2022
Coding problem1

1. System Design Question

Designing a chatbot system

Three actors in the system, platform, business and the end user
Chatbot which is an abstract entity in the platform, query resolution system
End users come and ask queries on the chatbot and the reply is sent
Business to define the queries and the replies specific to the chatbot.
Platforms task is to keep the chatbot running



Set of queries - Stand. Responses -> Configured by business
User management -> business -> can have multiple bots
Audit logs
Query Counter -> Analytics

Problem approach

User
-------
id : (Auto generated)
name: Sting
business_id : PK of Business

Business
------------
id : (Auto generated)
name

Bots
------
id: (Auto generated)
name
business_id : PK of Business
created_by: PK of user
created_time: Epoch time stamp
updated_by: PK of user
updated_time: Epoch time stamp

Query Responses
---------------
id: (Auto generated)
query: Text
response: Text
bot_id: PK of bot
created_by: PK of user
created_time: Epoch time stamp
updated_by: PK of user
updated_time: Epoch time stamp


Counter
-----------
query_id: PK of Query Responses
count: int




API

POST /business
PUT /business
{
id: “123”,
...
}

POST /user
{
business_id: “123”
}

PUT /user
{
id: “456”,
name: “”
...
}


POST /bot
{
business_id: “123”,
name: “bot 1”
}

PUT /bot
{
id: “123”,
name: “bot 1”
}

GET /bot/

{
id: “123”,
name: “bot 1”,
questionarrie: [
{
query: “what is it?”,
response: “this is it”,
created_time: Timestamp+Timezone
created_by: “123” (user id)
}
]
}

DELETE /bot?ids=123


POST /bot/123/query

{
query: “what is it?”,
response: “this is it”



PUT /bot/123/questionre

{
questionarrie_id: “890”,
query: “what is it?”,
response: “this is it”


GET /bot/123/questionre/890

{
questionarrie_id: “890”,
query: “what is it?”,
response: “this is it”,
created_time: Timestamp+Timezone
created_by: “123” (user id),
modified_time: Timestamp+Timezone
modified_by: “123” (user id),
count: 670 (Number of times it has asked)

}

DELETE /bot/123/questionre?ids=890

User API
GET /bot/123?query=”What is TOM?”

{
response: “TOM is a cat”
}


Elastic search

”What si TOM?” -> 
{
”What si TOM?”
}

{
bot: “123”,
“bot.questionre.query”: ”What si TOM?”
}

Redis for counters (qustionre_id->counter)
Multiple Clusters
Elastic search for (Query -> id)
Multiple clusters
Images -> S3 -> CDN





Design

Client -> CDN (Images)
-> Load balancer -> Quering service (Multiple servers) -> RDBMS
-> Bot Conffiguration -> REDIS
-> User management -> Elasticsearch
-> Analytics

Here's your problem of the day

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

Skill covered: Programming

What does HTML stand for?

Choose another skill to practice
Start a Discussion
Similar interview experiences
Software Engineer
3 rounds | 4 problems
Interviewed by Yellow.ai
656 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
1893 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
805 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 6 problems
Interviewed by Expedia Group
539 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
23629 views
8 comments
0 upvotes
company logo
SDE - 2
3 rounds | 4 problems
Interviewed by HashedIn
7919 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
5109 views
0 comments
0 upvotes