JPMorgan Chase & Co.
30+ Shree Vikunth Logistic Interview Questions and Answers
Q1. Rahul And Minimum Subarray Problem Statement
Rahul is mastering arrays. He is tasked to find the length of the smallest contiguous subarray in a given array/list ARR
of size N
, such that its sum exceeds a speci...read more
Q2. Reverse Words in a String: Problem Statement
You are given a string of length N
. Your task is to reverse the string word by word. The input may contain multiple spaces between words and may have leading or trai...read more
Q3. Minimum Travel Cost Problem
You are given a country called 'Ninjaland' with 'N' states, numbered from 1 to 'N'. These states are connected by 'M' bidirectional roads, each with a specified travel cost. The aim ...read more
Q4. Split Binary String Problem Statement
Chintu has a long binary string str
. A binary string is a string that contains only 0 and 1. He considers a string to be 'beautiful' if and only if the number of 0's and 1'...read more
Q5. Next Greater Element Problem Statement
You are given an array arr
of length N
. For each element in the array, find the next greater element (NGE) that appears to the right. If there is no such greater element, ...read more
Q6. Count Subarrays with Sum Divisible by K
Given an array ARR
and an integer K
, your task is to count all subarrays whose sum is divisible by the given integer K
.
Input:
The first line of input contains an integer...read more
Q7. Longest Increasing Path in Matrix Problem Statement
Given a 2-D matrix mat
with 'N' rows and 'M' columns, where each element at position (i, j) is mat[i][j]
, determine the length of the longest increasing path ...read more
Q8. Make Array Elements Equal Problem Statement
Given an integer array, your objective is to change all elements to the same value, minimizing the cost. The cost of changing an element from x
to y
is defined as |x ...read more
Q9. LRU Cache Design Question
Design a data structure for a Least Recently Used (LRU) cache that supports the following operations:
1. get(key)
- Return the value of the key if it exists in the cache; otherwise, re...read more
Q10. Top View of Binary Tree
Given a binary tree of integers, the task is to return the top view of the given binary tree. The top view of the binary tree is the set of nodes visible when viewed from the top.
Input:...read more
Q11. Intersection of Linked List Problem
You are provided with two singly linked lists containing integers, where both lists converge at some node belonging to a third linked list.
Your task is to determine the data...read more
Q12. Shortest Path in a Binary Matrix Problem Statement
Given a binary matrix of size N * M
where each element is either 0 or 1, find the shortest path from a source cell to a destination cell, consisting only of 1s...read more
Q13. Spiral Matrix Problem Statement
You are given a N x M
matrix of integers. Your task is to return the spiral path of the matrix elements.
Input
The first line contains an integer 'T' which denotes the number of ...read more
Q14. Pair Sum Problem Statement
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.
Note:
Each pa...read more
Q15. Pattern Matching Problem Statement
Given a pattern as a string and a set of words, determine if the pattern and the words list align in the same sequence.
Input:
T (number of test cases)
For each test case:
patte...read more
Q16. Merge Overlapping Intervals Problem Statement
Given a specified number of intervals, where each interval is represented by two integers denoting its boundaries, the task is to merge all overlapping intervals an...read more
Q17. Divide Linked List Into Two Problem Statement
You have been given a singly linked list of integers. Your task is to divide this list into two smaller singly linked lists wherein the nodes appear in an alternati...read more
Q21. What is the difference between multi tasking, multi processing and multi programming operating systems with examples ?
Multi tasking, multi processing, and multi programming are different approaches to managing tasks in an operating system.
Multi tasking allows multiple tasks to run concurrently on a single processor.
Multi processing involves multiple processors running tasks simultaneously.
Multi programming allows multiple programs to be loaded into memory and executed concurrently.
Examples of multi tasking operating systems include Windows, macOS, and Linux.
Examples of multi processing opera...read more
Q24. You have two threads one printing even numbers in order and other odd numbers. Design an algorithm so that it prints numbers in natural order?
Use a shared variable and synchronization mechanisms to ensure natural order printing of numbers.
Create two threads, one for printing even numbers and the other for printing odd numbers.
Use a shared variable to keep track of the current number to be printed.
Implement synchronization mechanisms like locks or semaphores to ensure only one thread can access the shared variable at a time.
Each thread should check if it is its turn to print the number based on the parity of the cur...read more
Q28. How to monitor heap memory area? And how objects are removed from heap memory
Heap memory can be monitored using tools like profilers. Objects are removed from heap memory through garbage collection.
Use profilers like VisualVM or Java Mission Control to monitor heap memory usage
Analyze heap dumps to identify memory leaks and optimize memory usage
Garbage collection automatically removes unreferenced objects from heap memory
Different garbage collection algorithms like Mark and Sweep, Copying, and Generational are used
Tuning garbage collection parameters ...read more
Q29. Can you design a load balancer which can handle multiple addition of new instances or pods?
Yes, a load balancer can handle multiple addition of new instances or pods.
A load balancer distributes incoming traffic across multiple instances or pods.
To handle multiple additions, the load balancer should be able to dynamically update its routing configuration.
Load balancers can use various algorithms to distribute traffic, such as round-robin, least connections, or weighted distribution.
Load balancers can also perform health checks on instances or pods to ensure they are...read more
Q30. Can you design a distributed system which can handle load of 1M requests per second?
Yes, a distributed system can handle 1M requests per second by using load balancing, horizontal scaling, and caching.
Implement load balancing to distribute incoming requests across multiple servers.
Use horizontal scaling by adding more servers to handle the increased load.
Implement caching to store frequently accessed data and reduce the load on the backend.
Optimize the system by using efficient algorithms and data structures.
Ensure fault tolerance and high availability by re...read more
Q31. Tell me about memory allocation (stack vs. heap)?
Memory allocation refers to the process of assigning memory to programs during runtime.
Stack allocation is done automatically and is limited in size.
Heap allocation is done manually and is larger in size.
Stack memory is used for local variables and function calls.
Heap memory is used for dynamic memory allocation.
Memory leaks can occur if heap memory is not properly managed.
Q32. How to handle an application running on different instances?
Handling an application running on different instances involves load balancing, monitoring, and synchronization.
Implement load balancing to distribute the workload evenly across instances.
Monitor the performance and health of each instance to ensure optimal operation.
Use synchronization techniques to maintain consistency and avoid conflicts between instances.
Implement failover mechanisms to handle instances going offline or becoming unresponsive.
Consider using containerizatio...read more
Q33. How to implements caching in your application?
Caching improves application performance by storing frequently accessed data in memory.
Identify the data that needs to be cached
Choose a caching strategy (e.g., in-memory cache, distributed cache)
Implement caching logic in the application code
Set appropriate cache expiration policies
Handle cache invalidation when data changes
Q34. Print a matrix in spiral order?
Printing a matrix in spiral order
Start from the first element and print it
Move in a spiral order towards the center of the matrix
Repeat until all elements are printed
Q35. Find substrings from a list program in Python
Use list comprehension to find substrings in a list of strings in Python
Use list comprehension to iterate through the list of strings
Use the 'in' keyword to check if the substring is present in each string
Filter out strings that do not contain the substring
Q36. SOLID principles and explain all of them
SOLID principles are a set of five design principles for writing maintainable and scalable code.
Single Responsibility Principle (SRP) - A class should have only one reason to change.
Open/Closed Principle (OCP) - A class should be open for extension but closed for modification.
Liskov Substitution Principle (LSP) - Subtypes should be substitutable for their base types.
Interface Segregation Principle (ISP) - A client should not be forced to depend on methods it does not use.
Depe...read more
Q37. Logging System explanations about splunk
Splunk is a powerful logging system used for collecting, indexing, and analyzing machine-generated data.
Splunk is used for real-time monitoring, searching, and analyzing log data from various sources.
It can be used to troubleshoot issues, monitor system performance, and detect security threats.
Splunk allows users to create custom dashboards and reports for visualizing data insights.
It supports a wide range of data sources including logs, metrics, and events.
Splunk can be inte...read more
Q38. Microservices Architecture explanation
Microservices architecture is an approach to software development where a single application is composed of small, independent services that communicate with each other through APIs.
Each service is responsible for a specific function or feature of the application
Services are loosely coupled, allowing for easier scalability and maintenance
Communication between services is typically done through lightweight protocols like HTTP or messaging queues
Microservices can be deployed in...read more
Q39. Hashmap vs linked hashmap
Hashmap allows null values and keys, while LinkedHashMap maintains insertion order.
Hashmap does not maintain insertion order, while LinkedHashMap maintains insertion order.
LinkedHashMap extends HashMap class and adds a doubly-linked list to maintain insertion order.
Hashmap allows null values and keys, while LinkedHashMap does not allow null keys but allows null values.
Hashmap is generally faster than LinkedHashMap for most operations.
Use Hashmap when order is not important, a...read more
More about working at JPMorgan Chase & Co.
Top HR Questions asked in Shree Vikunth Logistic
Interview Process at Shree Vikunth Logistic
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month