👨💻 Design & Algorithm Insights
"Success = (DSA + System Design) × Consistency × Problem-Solving + Mindfulness" 💡💻🚀
Categories
About US
Algorithms
Interview
java
keycloak
product
System Design
November 9, 2019
Paytm : Throttling on java method
Problem: Throw Exception when you method hit goes above a certain limit.
Approach: Try to implement the leaky bucket algorithm Here.
Solution:
November 8, 2019
Paytm : Print "P" "T" "M" using 3 threads.
Question:
Create 3 thread and ask them to print the alphabet P by thread 1, T by thread 2 and P by thread 3.
Approach:
1.create 3 threads with a there run method and shared variable.
2. update the shared variable after the execution of actual logic.
Solution :
Output: PTMPTMPTMPTMPTMPTMPTMPTMPTMPTMPTMPTMPTMPTMPTMPTMPTMPTMPTMPTMPTMPTMPTMPTMPTM
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)