kafka security
optimistic lock vs pessimistic lock
arraylist load facor
arraylist size grows once reached its load factor
cloud to onprem api call
rest implementation
spring jdbc template methods
spring jpa methods
java spec rest impl
how to produce xml response
how saga do rollback in microserviceA if it fails in microserviceB
jms vs rabbitmq vs kafka
kafka=zero copy principle ie no buffer, sequential access (partion,offset numbers are in sequence)
service discovery config
keda auto scaling config
csrf
cors
DTO validation
how making db entity class (pojo)
backing services - external services
race condition -multiple threads accesing single resource
backpressure-kafka pulish multiple message at single time
@Query
Website Leetcode to practice DSA coding
problems.
1. Data
Structure, and Algorithms |
|
2.
MQ (Kafka) |
https://ibm-learning.udemy.com/course/apache-kafka-for-beginners/ |
3.
NoSql |
https://yourlearning.ibm.com/activity/UDEMY-1802126 |

Areas
to Cover
· Java Data
Structures (LinkedList, Array, HashMap, HashSet etc) and Algorithms – Coding
(ds, search sort algorithms, time complexity of the approach)
· Java 8 – Coding: good on java 8 Features,
· Design patterns
(eg. Singleton) and SOLID design principles
· problem solving programming problem, solving thru brute force is
not acceptable, also solution be efficient,
· design view of current project, holistic view is needed.
· designing distributed systems: Gaurav Saxena on YouTube, should
know Kafka, should understand if asynchronous messaging happens, how it works,
· spring framework, JPA, microservice needs these: Annotation based
or xml based framework.
· Spring boot,
microservices (microservices design patterns such as Saga, Circuit breaker)
· Kafka
(architecture, scenario based questions)
· SQL (Queries)
· practice problem statements from sites like geeksforgeeks,
leetcode etc. to get proper grasp on problem solving skills
· Prepare on arrays, linked list, stack, search algorithms , queue,
sort algorithm, tree .
· time complexity & space complexity
DSA
How does hashMap works internally ?
Explain Data structures used in hashMap ?
Threshold is 8 and Linked list is default DS
until threshold is 8, beyond that BinaryTreeImpl is used due to best
performance
Explain what happens when hash collision
occurs ?
To overcome Performance issue in case of
collision,
-separate chaining – Linked list
-open addressing - Hashtable
SpringBoot
How does SpringBeans gets initialized ?
1.No-args constructor
2.InitializingBean.afterpropertiese(),
DisposableBean.destory()
How to resolve circular dependency ?
Happens in constructor injection, and to overcome, we can use seter injection
@Lazy can be used in construction injection
@PostConsruct also can be used
Types of Spring Beans ?
Design Patterns
Implement Singleton design pattern?
Class SingleTon{
Private static final SingleTon singleton;
Public static getInstance(){
Return SingleTon
}
}
How to make it thread safe?
Multi-Threading
Explain how synchronised blocks different from
Lock?
Databases:
Use of String pool, Different flavors of Map
collection and object associations. questions from his existing project about
use of different databases and what data you persist and how these data flow
from one DB. basic data structure question to write the code.
Discussion Pattern:
· Around 15-20 mins
technical discussion about project exp, API, Microservices
· Around 20-30 min
discussion on Data structure, algorithms, Code wring without using inbuilt
API’s or libraries.
·
DB, Messaging services, Design Pattern, CI/CD
etc.
FAQs
Vivek Pai
Round 2
·
Write singleton class which is thread safe, also shouldn’t break
with serializable as well as cloneable
·
internal working on concurrent hashmap? where exactly do we need
synchronization in that.
·
how executor framework works, what is it?
·
What is deadlock? write a program for deadlock
·
5, what are interthread communication methods
wait,notify,notifyall
·
How does threads communicate?
·
Explain the thread life cycle
·
Write implementation for equals method in String
·
why is string immutable
·
whats the output
· Solid design
principles.
·
String constant pool( explain when string objects are
created in SCP and when in heap).
·
Aftab Ansari
Round 2
1.
list all the entities used in one of the old projects and create
relations between two selected tables.
2.
What is an ExecutorService and what are its different
implementations? Could you explain how each implementation works internally?
3.
What is a BlockingQueue?Observable pattern
4.
How do you create a Factory design pattern?
5.
Can you implement the Singleton design pattern in Java to ensure
thread safety, handle serialization, and prevent cloning?
6.
Could you describe the internal implementation of the get() and
put() methods in ConcurrentHashMap?
7.
Explain the internal implementation of the equals() method in the
String class.
- Print the elements of an array in the decreasing
frequency, and if 2 numbers have the same frequency then print those
in ascending order.
- Input: arr[] = {2, 5, 2, 8, 5, 6, 8, 8}
Output: {8, 8, 8, 2, 2, 5, 5, 6} - Write a function to find the node with minimum value in
a Binary Search Tree.
- Explain Hashing consistency.
Separate chaining(open hashing)-Linked list
open addressing(closed hashing)-Hashtable - Write a sql query to find the list of students who
attended class of a teacher on Wednesday & Thursday.
select * from students where attendedDate in [Wed,Thur] and teacher in['a'] - Explain Exception handling.
- Explain Kafka Architecture, Offset and reset.
- Roles and responsibilities in last project.
8.
9.
Few integer elements are in
array in increasing order .few elements are repeated . we need to remove all
the duplicate element and order should be maintain . write a programme in java
to get the total number of unique element and complexity should be n
10.
No extra memory should be used
. we need to do in same array
11.
example int[] inputArray =
{1,1,2,3,3,4,5}
12.
output will be : 5
13.
2. we have nested Json
14.
like A:{b:{c:100}}
15.
we nee to write a programme to
find the value . suppose if we pass c we need value as 100 . write in java
script
16.
3. what is use of
hasOwnProperty and how it work
17.
4. hasOwnProperty will check
the prototype inheritance
18.
5. what cases we will get
undefined in java script
19.
6. when we not Initialize
variable in java script what will happen
20.
7. what is Hoisting in java
script
21.
8. what is difference between
let and var.
22.
9. what will happen if i
declare let . what happen in execution context
23.
10. what are ways we can pass
the data between 2 component
24.
11. why we need redux if we can
pass the data as props12. use of redux
25.
13.what is difference between
cookies and local storage.
26.
14.what will happen if we store
more then 4kb data in cookies
27.
15.suppose we have LinkedList
1>2>3>5>6>7>5 . I need to check if the LinkedList is circular
or not where the circle is starting .
28.
16.suppose we have stack will
push and pop random value . now particular time we want to pop the element that
should be minimum .
29.
30.
What are the microservice design pattern you know explain
them.
31.
What do you have to keep in mind if you want to create a
rest api endpoint.
32.
Where and why did graphql api was used
33.
What was the scenario to use kafka
34.
What was the scenario to use mongodb and why?
35.
Which framework was used for writing mongodb queries.
36.
Tell the whole process of code fetching a book from a
library system db creating a rest api.
37. Consider there
is a table with only one column ID with data looking below. Find the sequence
whenever there is a break in number order.
38. For example in
below table id 1,2,3 is sequence1 then 7,8,9 is sequence2 and so on,
39. we want to
find for each sequence what is min id, max id and total count.
40. Table (only
one column)
id
1
8
2
9
3
10
7
11
8
12
9
13
13
14
14
15
15
16
16
17
Expected Output
Seq_id start id
end id count
0 1 3 3
3 7 9 3
6 13
16
4
+---------------+---------+
| Column Name
| Type |
+---------------+---------+
| user_id
| int |
| activity
| enum |
| activity_date | date |
+---------------+---------+
41. There is no
primary key for this table, it may have duplicate rows.
42. The activity
column is an ENUM type of ('login', 'logout', 'jobs', 'groups', 'homepage').
43. Write an SQL
query that reports for every date within at most 90 days from today,
44. the number of
users that logged in for the first time on that date. Assume today is
2019-06-30.
45. Explain
Performance of the Spark Job
20 executores 1 core
1 executors 20 cores
46. CAP therom of
NoSql
47. write pyspark program to get delta records
48. with status from both tables and print the
output
49. History
table
id value
1 10
2 20
3 30
4 40
50. incremental
Data
id value
1 100
2 200
5 50
6 60
51. write pyspark
code for below
Player Match
Run o/p
A 1
20 20
A 2
10 30
A 3
20 50
B 1
30 30
B 2
10 40
B 3
50 90
52. pyspark
softdrink company has a transaction hive table named transaction. this data has lot of null fields and
duplicates. perform a data cleaning to
remove only when all the fields are null in a row and also remove the duplicate rows to show
binary tree left child node values solve the mathamatical expression y = ax^3 +
bx^2 + cx+ d design the banking statement
53. Given a set of
songs lets say 10 songs
play the songs such that
1.
All the songs in a set will get played
2.
songs will get played in random order.
input: [1,2,3,4,5,6,7,8,9,10]
op:[2,6,1,3,4,10,9,7,8,5]
op:[7,6,1,3,4,5,9,2,8,10]
54.
Given a binary tree, need to get the sum of
elements.
55.
arr = [3, 5, -4, 8, 11, 1, -1, 6],
targetSum=10
Need to provide subarray of 2 elements whose
sum will be targetSum
- Self
introduction and the technology you are aware of
- Design one
book library system including database
- What is
idempotent
- Which rest
call comes under idempotent
- What is 401
status and 403 status
- Scenario for
each of the status in an application
- Difference
between SQL vs NoSQL
- When to use
SQL and when to use NoSQL
- How do you
configure JPA in NoSQL database
- What's the
usage of Kafka
- How it is
different from traditional messaging system
- What is
offset
- How would
you maintain scalability
- 1001
messages are there in Kafka, suppose 1001
message came how would you handle that
- What's the
approach to resolve the production bug if you face
- How would
you check the services being deployed is working fine or not
- How would
you get notified if the application gets crashed and how to handle that
- How many
types of testing are there
- Have you
ever involved in BDD testing
- If QA guys
report any bug ,what is your approach to resolve that bug
- How many
collections are there in java
- How HashMap
works internally
- Sort an
employees based on salary
- Design the
application for ATM machine, all classes, interfaces, validations etc.
- Technical
discussion about current project, role and responsibilities.
- Some basic
questions from collections Java 8 new features and their implementations.
- Write a
program for given an array of strings strs, group the anagrams together.
You can return the answer in any order.
//An Anagram is a word or
phrase formed by rearranging the letters of a different word or phrase,
typically using all the original letters exactly once.
//Input: String =
["eat","tea","tan","ate","nat","bat"]
//Output:
[["bat"],["nat","tan"],["ate","eat","tea"]]
- Data
structure that can be used for the implementation of LRU cache.
- Write a program
to get the second maximum salaried employee in every designation from the
list of employees.
32.
33.
Given 1 Scenario
and asked for multiple possibel approaches (HLD, LLD):
- we have
multple servers which produces data and our requirements is to process data one
by one
that means
when one server data processed completely then only we will move further to
process data from other servers and finally combined the entire processed data
to persist in file system/ DB system. (discussion went for a long around 30-40
mins. with different different appoaches)
34.
given a list of
integer array [2,2,3,3,3,6,9,11] with a key 3.
asked to find the index of the first
occurance of provided key elements.
(provided solution in o(n) time complexity
then asked to try for better try complexity)
I have suggested Binary Search for
o(logn)then asked to write entire code for binary search tree and explain.
35.
36.
Can you create
our own Logger, and how many ways to create and which one is better way to
create the Logger?
37.
Explain the
project and Tec stack, which version used and why?
38.
Can you create
our own Logger, and how many ways to create and which one is better way to
create the Logger?
39.
WAP to find the
Max temperature of given below day temperature
int arr[] = {13, 15, 16, 17, 19, 21, 22, 24,
26, 29, 33, 35, 32, 31, 30, 28, 27, 26};
What is the complexity of this, can you reduce the complexity it. can
you reduce more & more more....
40.
How to handle
fail fast microserves. (Cricut Breaker in details)
41.
Is any other way
to handle fail fast microserves and yes then explain and other so on..
42.
which server you
deployed your microserves and what is the process
43.
have worked on
MQ, Kafka, any docker eureka container explain explain if worked.
44.
which Data Base u
r comfortable, are you able to wright query and procedure?
45.
Reverse list of
Employees based on the emp name using Comparator using Java8Multithreading,
46.
String pool, how
to create immutable class,Thread life cycle, notify vs notifyall.
47.
How garbage
collection works internally.
48.
Transaction
Management : Asked about transaction management in Spring JPA /Hibernate .
There was discussion on what are the propagation levels and
49.
Asked about
preload and postload annoation.
50.
Kafka:There was an
in depth discusion about kafka architecture .
51.
How internally
kafka works and how scalability can be achieved.
52.
Futher there was a
question related to message ordering guarantee.
53.
Then there was a
follow up question on any queue system I have used.
54.
Next discussion
moved to as which should be used kafka or MQ and why.
55.
Asked about some
networking related concepts in kafka.
56.
Scenario Related:
Gave a scenario where a simple review service like for IMDB had to be implemented.
Review Service would talk to other services
like user service. Asked to design and
code a skeleton class for the same.
57.
There was lot of
follow up questions like
58.
a) should we use
Integer or int . what is the advantage of using int .
59.
Follow up
question was that diff components of heap and stack and the lifecyle or transioning of the object
60.
across the stages
(discuss about young gen, old gen , perm genspace /meta space)
61.
when returing
from rest controller we are returing pojo but we get the reponse as json .
62.
How it gets
converted .
63.
MicroServices
patters:Then there was some discussion related to Micro Services design pattern
64.
Discussed about
Saga pattern : flavours of saga Choreography vs Orchestration.
65.
When to use what
and why .
66.
Then other
patterns like BulkHead,Reconcilation .
67.
How you have
implemented fault tolerance , retry meachanism etc .
68.
CAP Theorem vs
ACID Properties. Some questions related to No Sql . Again some scenario
discussions.
69.
However in terms
of coding it boils down to write a class which should have a counter which
should be incremented in a thread safe manner by everyone else .
70.
Asked about
spring boot actuator and monitoring tools used .
71.
Lastly there was
another scneario question where he said lets asuume review service discussed
earlier is used to create reviews
72.
and there may not
be millions of writes for the service . But once the review is live it may be
used by ecosystem of services like user service
73.
etc and there may
be lots of reads . In this case how would you pick the data stores and why .
74.
Some follow up
questions on the answer like whether data would be pre processed or will do
some join and give the response .
75.
76.
What is circuit
breaker pattern
77.
What are
different states in circuit breaker pattern
78.
How to configure
the threshold for circuit breaker pattern
79.
What are the
patterns you have used in microservices
80.
How jwt
authentication works
81.
How each request
is validated in jwt token
82.
How userdetails
are passed to other services after authentication
83.
How to reduce DB
calls for authentication in spring security
84.
How to perform
region specific deployment is microservices
85.
How to replicate
DB data across different regions
86.
Tools for query
performance analysis
87.
What is docker
and how it is used in the application
88.
How to deploy
spring boot application with docker and Kubernetes
89.
What is
Kubernetes cluster
90.
How to handle
high traffic in Kubernetes cluster
91.
What is a
topic,partition and consumer group
92.
How to decide the
number of partitions
93.
What is
asynchronous communication
94.
How to give
response to client in asynchronous communication
95.
How dependency
injection happens in spring boot
96.
How to specify
the order of bean instantiation is spring boot
97.
98.
write a function
to find common elements in two arrays and return array.
99.
Palindrome code
with different scenarios .
100.
Find 2nd highest
salary from the given table and largest Salary.
101.
@EnableAutoConfiguration
,@componentscan ,@service ,@component
102.
Kakfa
topics,partions,offset,subscption . How do we consume and produce kafka?
103.
Circuit breaker
design pattern
104.
Java 8 features
105.
Project in detail
106.
107. write a function to find common elements in two arrays and return
array. What is the time complexity in this program. How we can reduce the
time complexity with the best approach.
108. Design Employee sending messages and receiving messages
asynchronously.
a.
How we can design
database models. How many table would be required to achive the scenario.
b.
How to map the
two tables. Which is required sending id or receiving id.
109.
How to identify
the sending messages and receiving Messages.
110.
How to decide the
number of partitions.
111.
What is the
circuit braker pattern.
112.
Fault tolerance
113.
Write code to
print even and odd numbers, sequentially.
114.
What is
synchronized key word.
115.
What is this
keyword and use of this keyword.
116.
Why wait() and
notifyAll is in Object class.
117.
Can Override
wait() and notifyAll.
118.
Name the
collections which is synchronized.
119.
Sorted Array:
Hashset using sorted array for reducing time complexity
ü Main Areas:
o
core java basics
o
Working of
Collections, String pool.
o
Multithreading
& microservices
o
no sql DB.
o
data structures
and algorithms.
o
programming
question to write the brute force solution.
120.
Project
description
121.
Any feature which
you implemented in your last project. (User management, Account management,
Transaction management, Card Management)
122.
How microservices
interact with each other. Why to go for synchronous communication? When go for
for SAGA. When to use Choreograph and Orchestration pattern
123.
What is the
difference between SQL and No-SQL database?
124.
Brief
Introduction about used tech stack.
125.
What all are
design pattern used.
126.
Write a java
program for singleton Design pattern.
127.
How we can make
it thread safe.
128. Write a program for matching braces and find valid and invalid.
Ex:
o
(( - invalid
o
)) - invalid
o
(((( - invalid
o
)( - invalid
o
()() - valid
129. Write a program with help of java8 stream to find even number and
print result a list.
130. Given a list of people and a list of their relationships (x
follows y), find the celebrity - who follows no one, but everyone else follows
him.examples:
input - ([1,2,3,4],[(1,2),(1,3),(3,1),(3,2),(4,2)]), output – 2
input - ([1,2,3,4],[(1,2),(1,3),(2,1),(3,1),(3,2),(4,2)]), output
– None
input - ([1,2,3,4],[(1,2),(1,3),(3,1),(4,2)]), output - None
131.
what is java8
feature?
132.
what is
synchronization?
133.
what is
serialization and de-serialization?
134.
in what form
serialization and de-serialization happening(result format)
135.
what is terminal
operation in java8, give some names,
136.
why using
Optional class,
137.
diff b/w abstract
class and interface
138.
can we write
default method in interface?
139.
diff b/w hashSet
and HashMap
140.
diff b/w treeMap
and HashMap
141.
internal
Implementation of HashMap
142.
if two hashkey
will be same what will happen internally
143.
Scenario question
for designing endpoints, Controller, service, Dao and data layer annotation and
design high level
144.
diff b/w
controller and Rest Controller
145.
if data has to
fetch conditionally how will design your service
146.
Microservice
advantage
147.
148.
Problem – write a
method to find the common elements present between 2 arrays and print those in
a different array.
149.
Database design
for messaging app like WhatsApp.
150.
How Kafka works
in microservice environment
151. Problem - String Anagram check with O(n) time complexity.
152.
https://www.programiz.com/java-programming/examples/check-if-two-strings-are-anagram
153.
Difference
between Eager and Lazy loading
154.
Design a
Messaging system like WhatsApp.
155.
Java features and
performance knowledge
156.
Microservices
concepts
157.
DB concepts and
good query/DB design practices
158.
Efficient Query
and code writing,
159.
What are agents?
160.
Complex query
161.
Yfs_statistics
162.
Integration
servers
163.
How to convert
json to model data
164.
What's the
difficult situations u faced during coding/designing
165.
How to change
sales order status according to return order
166.
How do you
decouple a long transaction to limit the loading time.
167.
What's po,to
168.
What's ue
169.
What's the
purpose of hub rule
170.
Pipeline
171.
Where have you
used listener
172.
Payment apis
173.
Invoice ue
174.
How agents work
backend
175.
What happens to
leftover messages if agent stops midway and some messages are left in the queue
176.
What's header
charge, line charge
177.
How do you filter
shipping line charge for a line in java
178.
DSA
c.
How does hashMap work
internally ?
d.
Explain Data
structures used in hashMap ?
e.
Explain what
happens when hash collision occurs?
179.
SpringBoot
f.
How does
SpringBeans gets initialized ?
g.
How to resolve
circular dependency ?
h.
Types of Spring
Beans ?
180.
Design Patterns
i.
Implement
Singleton design pattern ?
j.
How to make it
thread safe ?
181.
Multi-Threading
k.
Explain how
synchronised blocks different from Lock ?
HM Round
1
1. Overview
on the profile – present/ past companies, tech stack etc
2. Scenario
or project details where you worked independently handling the project
3. Challenges
faced in any project
4. Performance
issues faced and fix for it
5. Asked if
used Azure consmosDB, asked whether I can able to learn how to use
6. cosmosdb
since I am not aware
7. Asked if
worked in any project where we had tight deadline, how was able to
8. deliver
within timeline
9. Monitoring
tools used in project – splunk- asked if can write splunk queries
10. without
any help, Dynatrace – asked if can understand graphs on my own
11. How
microservices are different from normal API applications
12. How
microservices are tested are debugged in my project
13. Asked if
fixed any production issues in previous projects
14. Asked
about frontend experience since mentioned in my profile
15. If any
certifications are done on core Java or other technologies
16.
Could you please tell me about yourself?
17.
Can you describe your recent project, including the technology
stack and architecture?
18.
What was the peak and average traffic levels experienced by your
application?
19.
Could you walk me through the steps you typically take when a
message fails to be processed within Kafka?
20.
Have you encountered any critical issues or notable features
during your project? If so, how did you resolve them, and did you feel a sense
of accomplishment afterward?
21.
Is there a designated code reviewer for ensuring code quality?
22.
Have you utilized both unit testing and integration testing?
23.
Have you ever worked during nighttime due to engagements with
clients in different time zones?
24.
Which version of Java did you utilize?
25.
Are you familiar with Web Flux?
Customer Feedback Form
Feedback for some candidates as a reference on
expectations from client.
Skills |
What did I ask |
My assessment |
My rating |
Programming |
Programming problem |
Wasn't able to write Code to solve the problem |
2 |
Java |
Programming problem |
didn't show familiarity with
Java features and performance |
2 |
Database |
Database design problem |
Candidate was not clear on many DB concepts and wasn't able to do a
good design |
1 |
Skills |
What did I ask |
My assessment |
My rating |
Programming |
Programming Problem |
Candidate was able to solve the problem with optimum performance |
4 |
Database & ORM |
Database design problem |
Was not able to create a good design. Does not have a good grasp of
ORM and good database practices |
1 |
LLD, HLD and microservice concepts |
Low level and high-level design problem |
Not good in low level design and microservice concepts |
1 |
Area |
Problem Statement |
Feedback |
Java |
Class-level vs object-level
lock |
Was able to explain the
difference |
Java thread-safe
singleton implementation |
Implementation was
partially correct |
|
Database |
ACID vs CAP |
Couldn’t explain ACID,
didn’t know CAP though candidate has worked on MongoDB & CosmosDB |
MongoDB, CosmosDB |
Very rudimentary
understanding, not familiar with eventual consistency, cosmos partitioning,
cosmos RUs |
|
Hibernate, ORM, JPA –
annotations |
Only familiar with very
basics annotations, couldn’t explain @transactional, @postload etc |
|
Messaging |
Kafka - partitioning,
delivery guarantee, consumer groups |
Familiar with basic
concepts such as partitions, brokers but doesn’t know why we create consumer
group, why consumers are added in group, delivery guarantee |
Web Application |
Connection Pooling – blocking
vs non-blocking I/O, Async vs Async |
Had basic understanding
of concepts but wasn’t able to articulate it and doesn’t have hands-on |
Resiliency Pattern – Circuit
Pattern, Bulkhead pattern |
Familiar with
circuit-breaker |
|
Microservices |
Spring Actuator |
had basic understand and
hands-on |
Coupling & Cohesion |
Had good understanding of
concepts |
|
Design & Coding |
Online Pet Store – correct datastore
selection for different use-cases |
Choices were incorrect,
candidate wasn’t able to justify trade-off |
MAT
IDC Program
- Basic introduction and project.
- Java coding
- Microservices (strangler pattern & Circuit breaker
Design pattern)
Coding question
--------------------
You are given an array
prices where prices[i] is the price of a given stock on the ith day.
You want to maximize
your profit by choosing a single day to buy one stock and choosing a didderent
day in the future to sell that stock.
Input : prices =
[7,1,5,3,6,4]
output: 5
Input : prices =
[7,6,4,3,1]
output: 0
Syed Safeer
1st Round
1. Around
18 mins of technical discussion about last project and experience.
2. Some
basic question on Java collections & Java8 meta space improvements.
a. How
does Hashset works internally.
b. Some
questions on Tree map.
c.
Questions on Meta space improvements
in Java8
d. Desing
patterns.
a. Given
Array [29, 40, 20, -2, 0, -5, 24, 25, -3, 44, 33, 24, 29, 38]
Expected Output: [29, 20, 25, -2, 0, -5, 24, 33, -3, 38, 40, 24, 29, 44]
a. Given
Array [1, 1, 5, 9, 10, 10, 12]
Expected Output: [5, 9, 12, -1, -1, -1, -1]
2nd Round
1.
Explain your last project in briefly?
2. Some
questions asked on Spring Framework and few questions were from Mongo DB about
consistency and eventual consistency.
3. Asked
about Kafka and follow up question about any project done with the Kafka.
4. Asked
to design Restaurant service for placing the online food orders(Ex :
Swiggy/Zomato). Based on user city/location user should be able get all the
restaurants and from the selected restaurant should be able to select the menu
and then place the order.
a. High
level design.
b. What
are different services that are needed here?
c.
Different end points.
d. How
can we design the data models. How many different database tables would be
required here and what are the relationship between them.
e. How
to choose which databases are required here and why ?
f.
How all the different services
interact with each other.
g.
How the user Details are passed to
other services after authentication and some other follow up questions related
to design ex: how to handle the cancellation of orders and how to handle
payments made in case of cancellation.
3rd Round
1. Brief
intro about the project and the tech stack.
2. Question
related to real time experience on Messaging Queues/ Kafka.
3. Question
related to Mongo DB Sharding and internal working of the same.
4. One
question related to Mongo Db Profiler.
5. Circuit
breakers in microservices.
6. How
OAtuth2 works and how to configure the same.
7. Asked
about the exception handling in java and some best practices of exception
handling.
Few questions
related to Agile methodology.
Sumit Kumar
1st Coding
Round :-
1.
Technical discussion
about current project , role and responsibilities.
2.
Some basic questions
from collections Java 8 new features and their implementations.
3.
Write a program for
given an array of strings strs, group the anagrams together. You can return the
answer in any order.
//An Anagram
is a word or phrase formed by rearranging the letters of a different word or
phrase, typically using all the original letters exactly once.
//Input:
String =
["eat","tea","tan","ate","nat","bat"]
//Output:
[["bat"],["nat","tan"],["ate","eat","tea"]]
Ruby
1.
Data structure that
can be used for the implementation of LRU cache.
2.
Write a program to get
the second maximum salaried employee in every designation from the list of
employees.
Perumal’s Replacement
Aniket Samant
1. I am aware of arrays, linked list, stack,
search algorithms and prepared on queue, sort algorithm. Thus skipped
preparation tree and rest of the topics.
2. I could not really think about any solution
of the 1st problem statement even after discussion for some time, went to the
2nd problem statement where I provided one solution where I provided a solution
having minimum time complexity but some space complexity but again could not
think of any solution with no space complexity and minimum time complexity.
3. I should have practised more than enough
problem statements from sites like geeksforgeeks, leetcode etc. to get proper
grasp on my problem solving skills instead of preparing interview based on the
questions having complex scenarios as sent to me to get suggestion.
Please find the set of problem statements as
part of interview so that any person trying in future will come well prepared
on problem solving skills:
56.
Given a set of songs lets say 10 songs
play the songs such that
1.
All the songs in a set will get played
2.
songs will get played in random order.
input: [1,2,3,4,5,6,7,8,9,10]
op:[2,6,1,3,4,10,9,7,8,5]
op:[7,6,1,3,4,5,9,2,8,10]
57.
Given a binary tree, need to get the sum of
elements.
58.
arr = [3, 5, -4, 8, 11, 1, -1, 6],
targetSum=10
Need to provide subarray of 2 elements whose
sum will be targetSum
G Venkataramana
to show binary tree left child node values
solve the mathamatical expression y = ax^3 + bx^2 +
cx+ d
design the banking statement
Rawutagouda.biradar
1. What are Rest API's and how to secure them?
2. How to handle the multiple parameters of get API in
controller method.
3. Write a multithreaded program where on thread prints
odd numbers and other even numbers in between 0-50.
4. Write a multithreaded program where only one thread
should be able to print the content of file to console pass to it using
Executor Services.
5. Find out the highest salary taker employee of each
department from the list of employees using Java stream APIs.
6. What's the immutable class?
7. Sort the list of students by their name using Stream
APIs.
8. Write an example for Spring batch processing?
9. Write the code for Spring JWT token-based
authentication?
10. Write code for the scenario which explains Circuit
breaker functionality in micro-services.
Shishir S
Question:-
You have to design an API which caters to booking a ticket for a particular
user.
There
is a availability counter present in database and whenever a request to book a
ticket is made by an user , below mentioned tasks have to be completed
asynchronously.
- Make a database call and check for
availability counter , if it is greater than one , book the ticket
and decrement the counter.
- Whenever a successful booking is done,
trigger an email to the user with the booking details.
- Also, at the same time , push and event
to Kafka with the details of the ticket booking.
For
the above scenario, how the request and response would look and how would it be
able to work for multiple users simultaneously trying to book tickets. All
possible questions wrt the above scenario and actual hands on coding on the
same.
Supraja Gumpu
1. Kafka related, diff btw kafka and JMS,
partitions, and how to decide number of partitions, how partitions divided per
consumers,
2. consumer group
3. write consumer code
4. HashMap -> can I have object as key ->
asked to write hashcode and equals methods
5. sort list of employees based on name using
java 8
6. connection pooling
7. circuit breaker, asked to write code for it
8. multithreading, print numbers using 2 threads
like
9. Thread 1: 1 //odd numbers to be printed by
Thread1
10. Thread 2: 2 //Even numbers to be printed by
Thread2
11. Thread 1: 3
.
.
.
12. what is synchronized keyword
13. webflux ->hooks, reactive programming
advantages
14. mongoDB -> how do you ensure your query
based on some variable(not id)
15. returns faster results -> Indexing
16. Are you aware of CosmosDB?
17. Spring AOP
18. How do you secure your rest apis? Spring
security, JWT authentication
19. performance of application -> how do you
make sure the requests are not overloading the db
20. how do you handle when out of memory issue
happens in microservices
Suggestive Areas
1. Kafka: kafka architecture,
Panel: Sagar(2nd Round)
2.
1. Write singleton class which
is thread safe, also shouldn’t break with serializable as well as cloneable
3.
2. internal working on
concurrent hashmap? where exactly do we need synchronization in that.
4.
3. how executor framework
works, what is it?
5.
4. What is deadlock? write a
program for deadlock
6.
5, what are interthread
communication methods
7.
6. How does threads
communicate?
8.
7. Explain the thread life
cycle
9.
8. Write implementation for
equals method in String
10.
9. why is string immutable
11.
10. whats the output
12.
13.
String s1="name";
14.
String s2="name";
15.
String s3 = new
String("Name");
16.
17.
sysout(s1.equals(s2));
18.
sysout(s1.equals(s3));
19.
sysout(s1==s3));
20.
11. What are the different
types of cache?
21.
12. what is LRU cache?
22.
13. Why did you use Hazelcast
in your project
23.
14. Explain whole project along
with the bottlenecks and challenges faced.
24.
15. what are different memories
in java
Candidate: Shubham
Round 1
1-explain about the recent project.
2.Have u work on Kafka.
3-write a Pseudo code how we can migrate
the data from mongo db to Cassandra db in real time.
4-write spring boot code to accept a file
and upload in spring boot.
5-do you work on Aws s3 database cloud.
6-What are the types of beans explain the
life cycle.
Candidate: Prabhat
1) Tell me about your current project ?
2) What is your role and Responsibility in
your project?
3) Difference b/w No SQL and RDBMS?
4) What all Desigh pattern you have used?
5) What is JWT, How you implemented in your
project?
6) What all collection you have used in
your project?
7) What is HashMap and tell me how it's
different with HashSet?
8) What is String and why it's Immutable in
Nature?
Candidate: Ramesh
1.what does git revert?
2.what does git commit?
3.what is the index and why we use the
index? can we put indexes to all the columns? if it is yes why? if it is not
why?
4.Explain indexes internal working?
5.what is Kafka?
6.where the Kafka messages store?
7.What is the messages data structure in
Kafka?
8.what is the retention period?
9.what are the http methods? and what is
the idempotent method?
10.what is the difference between put and
patch?
11.write the singleton class and explain
line by line?
12.leetcode question:- add any three
elements in an array and its sum should be zero, return the list of list.
Input: nums = [-1,0,1,2,-1,-4]
Output: [[-1,-1,2],[-1,0,1]]
Candidate: Raihana
- Detail explanation on the
current/recent project.
- How to subscribe for a Kafka
Channel on a specific topic
- Write a code to filter only
digits from a String using streams.
- How do you limit the number of
requests for a microservice
- How do you secure an API ?
- What are the precautional
measures that has to be taken care while calling a third party API
- Explain about OAuth
- How do you maintain concurrency
across multiple request
- Explain ExecutorService
framework
- Explain Circuitbreaker pattern
Panel name: Gnanaprakash Selvakumar
1. Tell me about your
previous project
2. In given sorted array
,there is one non sorted integer .Find that and place that in right position in
array so it is fully sorted.
Note: Without sorting
Input:[1,2,4,6,7,9,5,10]
,Output [1,2,4,5,6,7,9,10]
3. Find highest integer
from list using streams.
4.Explain how to create
Rest APi
5.How to secure Rest
API's.
6.Explain JWT
implementation
7.Are you familiar with
Web Flux?
8.How to deploy spring
boot application with docker.
Panel: Sambeet Mohanty
1.
Write a
multithreaded program where on thread prints descending order number and other
ascending order numbers in between 0-50.
Output should be
Thread 1 :0
Thread 2 :50
Thread 1 :1
Thread 2 :49
Thread 1 :2
Thread 2 :48
Thread 1 :3
Thread 2 :47
Thread 1 :4
Thread 2 :46
2.sort list of employees based on name using
java 8.
3.Can we use object as a key in hashmap in Java?
If yes can you explain how.
4. what is Circuit Breaker. can you write the
program.
5.which are component or service use in AWS.
explain all of them.
6. how building image and deploying in cloud.
7. how checking performance issue of you application.
8.how taking thread dump and heap dump and which
senario you take thread dump and heap dump.
Panel: Prabhu & Kunal
1. Collections hierarchy
2. Hashmap internal implementation? put and
get methods
3. How to use hash map in multithreaded environment
4. Concurrent hashmap
5. String str = "abcdabcd"; Find the
occurences of each charecters and print if its greater than 1?
6. Scenario for Observable design pattern and
how to implement it?
7. Sql query to group by city and sellDate
between 2020 to 2024
8. Solid Principles
9. Completable feature
10. How garbage collection works
11. Security handling
12. Singleton design pattern with
implementation
13. Status code 401 and 403
14. Exception handling
15. Mongo DB connection
Panel: Prabhu
What is Collection framework
Hierarchy of collection framework
HashMap is thread safe?
Hashtable is thread safe?
How do you implement your own hashcode and equals?
What is hashcode?
Internal working of HashMap?
Different framework worked upon?
Design principles?
Design patterns?
HashMap has Car class object as key and person name as
value, how do you retrieve car belonging to the person
and usual project experience, intro, and CI/CD tools
and other tools
Panel: Prabhu
1.
Hirarchy of Collection classes
and how collections are implemented.
2.
How hashMap works ? is hashmap thread safe ? why hashmap is
replaced by hashtable ?
3.
What is the difference between
syhcnshronized map and concurrent map?
4.
What the word synchronized
keyword does ?
5.
if we have 2 synchronized
methods and 2 explain on all the scenarios ?
6.
2 methods one is static
synchronized and one is synchronized same question on as 5 how it works.
7.
How we can implement question 5
and 6 without use of synchronized key word ?
Ans : we need this and
class_name.class locks in sychnronized block
8.
What is the dead lock and race
condition?
9.
What are the states of the
thread ?
10.
Executor services ? executer
and executor service difference.
11.
What the methods of the thread
for inter process communication ? .
12.
Wait() notify() notify() are
originally from thread ? they are from
object ?
13.
Why they are from object not
from thread ? what are the other methods in object?
14.
Print odd and even numbers
using 2 threads. the 1 thread thread should print only odd numbers one more
should print only even numbers.
15.
In the input string “Java
Concept Of The Day” count frequency of digits using java 8 streams.
16.
I have a job posting platform,
if I post a job it should be get posted in other platforms such as linkedin,
naukari, indeed. How do you design, list down design pattern, list down all
interfaces and classes.
17.
Questions of garbage
collection? Explain serial, parallel and GFGC
18.
Have you used kafk, how it is
different from other messaging services ?
I have used both rabbit MQ and kafka and I just explained that.
19.
What are completable futures?
how do we submit and receive status of all features?
20.
Have you used springboot? explain @sprinbootApplication annotation.
21.
Have used any cloud services?
Panel: Priyadarshi
1.
Project related questions.
2.
Implementation of
Elevator(Lift) , and also given some condition and answer according to that.
3.
Convert Roman to integer in
java.
4.
Bean related questions, such as
can we have same type bean in multiple class, if not then why, vise versa. Or
can we have same type multiple bean in same class then how can we
differentiate.
Panel: Mirdula
Round 2 :
1. Please explain your current project.
2. Explain a day in your project.
3. Manual Deployment of application in tomcat server.
4. How to write the kafka producer.
5. Have you used splunk ?.
6. How to deploy a micro services
Panel: Sooraj
write down the
data structure of insert employee id, delete employee id and check employee id
in the list, find random id of a employee with Time Complexity(O1)
Panel: Chetana
1) Find pair
that makes the sum from array [1,2,3,4,5,6,7,8,9]. Sum = 9
SOlution : (1,8),(2,7),(4,5),(3,6)
2) Design a task management system with a
RESTful API. The system should allow users to create, read, update, and delete
tasks. Each task has a title, description, status (e.g., open, in progress,
completed), and due date.
Requirements:
Users should be able to create a new task with
a title, description, status, and due date.
Users should be able to retrieve a list of all
tasks or fetch a specific task by its ID.
Users should be able to update a task's title,
description, status, or due date.
Users should be able to mark a task as
completed or delete a task.
The API should be designed following RESTful
principles.
Implement basic error handling and validation
for input parameters.3) Serialization, Cloning etc
3) JPA
4) Microservice vs Monolith Architecture
5) SCP
Panel: SankaraNarayana
1. Implement State Design pattern in Code
2. Explain Strategy Pattern. Give example.
3. Explain Adapter Pattern. Give example.
4. Two Threads. First thread prints
multiples of 2. Second thread prints multiples of 3. One of the threads should
print,
common multiples.
5. How do two threads communicate ?
6. Comparing objects (based on a list of
columns such as price, ord_date, customer id),
How would sorting code ??
7. Give an overview of the work which I
have done in recent 2 to 3 years.
8. Explain about the Google IP Connect and
how it can replace Cookie based Authentication.
Panel: Lokesh
How to create BST , create LinkedList bsaed
on single,circular, My Project based Microservice design and Spring IOC and
Spring Boot different
Panel: Ankita
1) Create your own ArrayList class and implements
all required interface and implements its methods, Consider Java does not have
ArrayList class.
2) Multithreading, CompletableFuture, Thread
Pool,
3) what factor impacts ThreadPool size design.
4) NoSQL and RDBMS database
5) Restful API
6) POST, PUT methods differences.
7) Bean Scopes and at what time bean
instantiation happens.
Panel:
Devesh
·
Difference
between SQL and no SQL and use cases . When to use which .
·
Advantages
and disadvantage of using Microservices
·
Design
patterns used in Microservices
·
Proxy
design pattern ?
·
Abstract
factory and factory design pattern?
·
Write
hello world program for spring boot application.
·
Print
hello world with using main method
·
Most
complex problem you faced till now
·
Singleton
design pattern
·
Object
oriented design and principles
·
Print
hello world without using main method*
Panel: Devesh
Java 1.8 feature
How to do the serialization, if we dont want
to do the serialize the few fields then how do you do it
How to use the groupingBy function
SpringBoot annotations user like – 1.
@SpringBootApplication, @ComponentScan,@Configuration,@Componant
Microservice design pattern
Panel: Ram Prasad
Find the count of distinct numbers in array [1,2,2,3,4,4,5]
Time complexity of streams.groupingby ?
WAP to print “I am thread 1” “I am thread 2” till 10 using 10
threads
Multiples ways of creating Threads
Runnable vs Callable
What is Completable Future ? Difference between future and
completable Future?
What design pattern will you use if multiple services are using
same database ?
Cass B extends class A{ method1(){};}
Class C extends class B{method2(){};}
A a = new C();
a.method1();
Panel:
Mridul puri
1.Tell me about your previous project.
2.Project related questions.
3. Given an array nums with n objects
colored red, white, or blue, sort them in-place so that objects of the same
color are adjacent, with the colors in the order red, white, and blue.
We will use the integers 0, 1, and 2 to
represent the color red, white, and blue, respectively.
You must solve this problem without using
the library's sort function.
Example 1:
Input: nums = [2,0,2,1,1,0]
Output: [0,0,1,1,2,2]
Example 2:
Input: nums = [2,0,1]
Output: [0,1,2]
4. Output for below code
String str1 = "InterviewBit";
String str2 = "InterviewBit";
System.out.println(str1
== str2);
String str1 = new
String("InterviewBit");
String str2 = "InterviewBit";
System.out.println(str1 == str2);
System.out.println(str1.equals(str2));
5.Which String class should be used for
thread safety.
6.Monolithic vs microservices ,when to go
for which?
7.Spring boot basics
8.Mongo db vs relational db , when to go for
which?
9.Kafka basic and how to scale up producer
and consumer based on meassages/sec
10. What parameters
to be considered to check performance of api in metrics.
Panel: Manjeet
1. Scenario based
question
-> Design an API which powers the
homescreen with store information considering factors like store id, product,
start date , end date filters? When user enter a homescreen he is able to
filter using start and end date for availability of products!!
-> What is your response structure in
this?
-> How will client pass page numbers?
-> In terms of performance of the created
API what should be considered?
"code which was
written for :
/api/operation?pageno=10&
@RestController
@requstMapping("/api/operation")
class
SearchOperationController{
@Autiwored
private SearchOperationServcei
service;
@GetMapping
public
ResponseEntity<?> searchOperation(
@RequstParam("pageno")
Long pageNo,
@RequstParam("pagesize")
Long pageSize,
@RequstParam("storeid)
Long storeId,
@RequstParam("service)
String service,
@RequstParam("startTime)
LocalDateTime startTime,
@RequstParam("endTime)
LocalDateTime endTime
){
return new
ResponseEntity<>(serivce.searchOperation(), HttpStatus.OK);
// OperationResponse{
List<Operation> operations; }
}
}
"
2. Scenario based:
A service where it
takes a request like customer address with details, and display the list of
slots available from start datetime to end datetime. The service uses a cache,
it fetches data from DB!!
-> Familiarity of API worked on DB(Cosmos
DB)?
-> What is the benefit of no SQL db?
-> APi uses cache for lot of data fetch
internally, lets say when we running this service in production, all of a
sudden we start seeing error, like requests are coming and failing with error
codes, in a minute we are seeing some 30 % error, How would you figure it out
the error, traiging , finding, what is your approach, A step by step
explination?
3. Worked on any
chaching solution?
4. Have you used
centralized cache?
5. what are the Key
controls\configs for a production ready Kafka producer, before the config, what
is the mechanism it goes through. Explain in High level?
6. How much time kafka
takes to publisha nd event to brokers?
7. What is the most
difficult thing you have faced and solved in your previous employer and wwhat
are the steps taken to resolve it?
Panel: Brinda
1)Write a program for
given an array of strings strs, group the anagrams together. You can return the
answer in any order.
Input: String =
["eat","tea","tan","ate","nat","bat"]
Output:
[["bat"],["nat","tan"],["ate","eat","tea"]]
2)Write a program for
given an array counts the frequency of each integer in the array and then
prints the top k frequent integers along with their frequencies.
Input: nums =
[1,1,1,2,2,3], k = 2
Output: [1,2]
Panel: Prabhu
)HashMap
internal working
3
program how we handle exception in java and spring boot
using
try catch finally block write a program how we handle multiple
exception for ex - Arithmetic, null pointer, fileNotFound exception
Find
the occurrence number program in given string str= "i love
india" using java 8 stream api
optional
class how we avoid null Pointer exception
Functional
interface and lambda expression
Car
Class example write a pojo class having variables carId, carModel,
carName , using HashMap key as CarName and value as Owner_Name find a car
Owner name using java 8
Panel:
Piyush
1.
write a program to find average of price for brand
from list of item(name , price, brand)
2.
polymorphism
3. @Autowire
4. Primary/qualifier annotation
5. circuit breaker
6. load balancing
7. nosql database(Collection , Documents)
Panel:
Atul(Round-1)
1) Java OOPs concepts
2) Java 8 features
3) Create Employee class as immutable
4) Create all the required code to make
Employee class as Key to the HashMap
5) filter employees whose age>50
6) java program to find indexes of two
integers whose sum is equal to target.
Panel:
Atul
1- Tell me about yourself, past projects & tech
stacks used in past projects
2- Do you know Kafka & Elastic Search.
3- What is OOPs and explain about the pillars of OOPs
4-What are the design pattern you have worked in the
projects, explain why in real time scenario.
5-Difference between factory & abstract factory
design pattern
6-How RabbitMq is working, & internal
datastructure used
7-what is immutability in java. Write a custom
immutable class in java
8-Can you store object as a key in hashmap, how will
the hashmap works internally when the key type is Object
9-He has given on Leetcode program
9- Print the index position of any 2 element in the
given array whose sum will be equal to given target
example- input Array= [5, 2, 4], target=6, output =
[1, 2]
Panel: Brinda
1) write a program for given arrya return the sum of
subarray of 2 or 3 elements .
arr = [3, 5, -4, 8, 11, 1, -1, 6], targetSum=10
2) write a program for
to print the file contains line by line using try with resource.
3) Write a multithreaded program where only one thread
should be able to print the content of file to console pass to it using
Executor Services.
4) Write a multithreaded program if file path
dynamiclly changing than one thread should be able to print the content of file
use watcher service to keep watching if any changes happen in file path or
file.
5) what are design pattern used.
6) example of pre define singleton class avilable in
java.
7) why used mongoDB in your project.
Panel: vimal
1.Given an array of intervals where intervals[i] =
[starti, endi], merge all overlapping intervals, and
return an array of the non-overlapping intervals that
cover all the intervals in the input.
Example 1:
Input: intervals = [[1,3],[2,6],[8,10],[15,18]]
Output: [[1,6],[8,10],[15,18]]
Explanation: Since intervals [1,3] and [2,6] overlap,
merge them into [1,6].
Example 2:
Input: intervals = [[1,4],[4,5]]
Output: [[1,5]]
Explanation: Intervals [1,4] and [4,5] are considered
overlapping.
Time complexity , how u reduce it
2. Kafka topic , Kafka message related questions.
3. How you design REST API call for Walmart Consumer
end to end flow with coding explations.
Panel : Sabatra datta
1) Tell me about yourself, past projects & tech
stacks used in past projects
2) Java 8 features
3) Create Employee class as immutable
4) HashMap Internal Working
5) Fail Fast and Failsafe Iterator.
6) Program: Order class have 2 variables Rating and
Price. Sort ProductList by Rating descending And if 2 products have same rating
sort by Price ascending.
7) Application Context & Bean Factory
8) Deadlock in Multithreading
9) Comparator and Comparable.
10) Thread States.
11) Concurrent HashMap internal working.
Panel: Lokesh
How to make method thread safe? some scenarion on
thread safe?
performance is fast in primitive data type or wrapper
class?
what are the thread states? when thread is Blocked
state?
try with resource concept?
Difference between @Component and @Service? Can we use
@Component instead of @Service?
Type of exception? scenario in exception
default scope bean? why default scope?
What is the purpose of default method in interface if
we have abstract class?
dependency injection scenario?
In post api, json response : { “a”: “1”, “b”: “2”,
“c”, “3”}
how to map to { “x”: “1”, “y”: “2”, “x”, “3”}
How to handle the exception in application?
Panel: Deeksha
1- tell me about yourself, past project worked and
techstacks used
2- open any editor or ide and write a full
implementation of a List which would replace existing List class in java
3- Tell me something about List and why it's used
4- How jvm works in java
5- tell what is the benefit of using executor
framework over creating threads manually
6- what are the beans scopes, give real time example
of bean scopes
7- what is dependency injection and IOC
8- what is the difference between you created object
and IOC created object
9- write a program in java 8 to print count of items
by category whose price is greater than 10
Panel: Praharsh
Give a brief about your project
Explain collection hierarchy
Explain HashSet and LinkedHashSet.
explain the internal implementation of HashMap
What is HashMap collision.
I was asked to showcase a scenario based program on
HashMap collision
Find the occurrence of each string from a given string
Detailed question on Exception Handling (Checked,
Unchecked)
Question on multithreading (Callable and Runnable)
Panel: Lokesh
Java 8 program
Input : ["Vimal Prabhakaran", "kailash
Gupta", "Vinod Chopra", "Anil Chopra", "Abdul
Rahman", "Niloy Singh"]
o/p: ["Prabhakaran", "Gupta",
"Rahman", "Singh"]
Garbage collection concept and scenario
Memory Management concept
JVM and JIT
What is refelection and scenarion
@Service and @Component difference
Which Annotation is used for inheritance
Panel : Rounak
Questions:
- How does bean different from conventional object in
Spring?
- How does spring application starts? What is the
backend process?
- What is singleton?
- When to call HashCode and when to call equals
methos?
-Internal working of HashMap
- Same HashCode & Same Key -> ..? && Same HashCode & Diff Key
-> ..?
- What is synchronization?
- kafka Basics
Panel: Animesh
You are given an m x n grid where each cell can have
one of three values:
0 representing an empty cell,
1 representing a fresh orange, or
2 representing a rotten orange.
Every minute, any fresh orange that is 4-directionally
adjacent to a rotten orange becomes rotten.
Return the minimum number of minutes that must elapse
until no cell has a fresh orange. If this is impossible, return -1.
Example
Input: grid =
[[2,1,1],
[1,1,0],
[0,1,1]]
Output: 4
[[2,2,1],
[2,1,0],
[0,1,1]]
[[2,2,2],
[2,2,0],
[0,1,1]]
[[2,2,2],
[2,2,0],
[0,2,1]]
[[2,2,2],
[2,2,0],
[0,2,2]]
Input: grid =
[[2,1,1],
[0,1,1],
[1,0,1]]
Output: -1
[[2,2,1],
[0,1,1],
[1,0,1]]
[[2,2,2],
[0,2,1],
[1,0,1]]
[[2,2,2],
[0,2,2],
[1,0,1]]
[[2,2,2],
[0,2,2],
[1,0,2]]
Panel: Kunal
Write program to execute the odd even number using
multithreading.
Write a program to get the number times each character
repeated in a String
Write a program to for a maximum profit that can be
taken in a week of selling and
purchasing a stock.
Write a program to achieve a singleton object and get
the object using plain java
without using spring boot features.
Explain about heap data structure and when to use it.
Explain about graph data structure.
Explain about priorityqueue and how is different from
queue.
Write a program to send notification to user using
plain java code without using
third party libraries.
How to get a singleton instance of an object without
creating a bean in springboot
Explain about the cyclic tree data structure