Open In App

JP Morgan Interview Questions and Answers for Technical Profiles

Last Updated : 25 Jan, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

JP Morgan, a big player in finance worldwide, is well-known for being very careful when choosing new employees, especially for technical jobs. To help you do well in your upcoming technical interview at JPMorgan, we’ve put together a detailed list of questions that are often asked, along with their answers. This guide is created to give you the most common technical interview questions and valuable insights into the kinds of questions you might face and aims to help you showcase your technical skills effectively and create a positive impression on JPMorgan interviewers. Get ready to succeed in your JPMorgan technical interview with our well-thought-out solutions to common technical questions.

To know more about JP Morgan Recruitment Process please go through this attached link

1. What is a linked list Data Structure?
Linked List is a linear data structure, in which elements are not stored at a contiguous location, rather they are linked using pointers. Linked List forms a series of connected nodes, where each node stores the data and the address of the next node.

2. What are the operations that can be performed on a stack?
A stack is a linear data structure in which the insertion of a new element and removal of an existing element takes place at the same end represented as the top of the stack.

3. What are the various types of Classes in C++?
Class in C++ is the building block that leads to Object-Oriented programming. It is a user-defined data type with a memory memories graph’s with memory own memory data members and member functions, which can be accessed and used by creating an instance of that class.

4. What is a singleton class?
A singleton class is a special type of class in object-oriented programming that can have only one object or instance at a time.

5. Differentiate between multitasking and multithreading.

Multitasking

Multithreading

In multitasking, users are allowed to perform many tasks by CPU.

While in multithreading, many threads are created from a process through which computer power is increased.

Multitasking involves often CPU switching between tasks.

In multithreading, CPU switching is often involved between the threads.

In multitasking, the processes share separate memories graph’sroot uniquely roots.

While in multithreading, processes are allocated the same memory.

Multitasking is slow compared to multithreading.

While multithreading is faster.

6. What is inheritance?
Inheritance is a feature or a process in which, new classes are created from the existing classes. The new class created is called the “derived class” or “child class” and the existing class is known as the “base class” or “parent class”.

7. What is a deadlock and discuss the necessary conditions for deadlock?
A Deadlock is a situation that involves the interaction of more than one resource and process with each other. We can visualize the occurrence of deadlock as a situation where there are two people on a staircase.

8. What is the OSI Model?
The OSI model, created in 1984 by ISO, is a reference framework that explains the process of transmitting data between computers. It is divided into seven layers that work together to carry out specialized network functions, allowing for a more systematic approach to networking.

9. Difference between Queue and Deque?

Queue

Deque

A queue is a linear data structure that stores a collection of elements, with operations to enqueue (add) elements at the back of the queue, and dequeue (remove) elements from the front of the queue.

A deque (double-ended queue) is a linear data structure that stores a collection of elements, with operations to add and remove elements from both ends of the deque.

Elements can only be inserted at the end of the data structure.

Elements can be inserted from both ends of the data structure.

Elements can only be removed from the front of the data structure.

Elements can be removed from both ends of the data structure.

Queues are a specialized data structure that uses the FIFO approach i.e., First In First Out.

Deque can be used to implement the functionalities of both Stack (LIFO approach i.e., Last In First Out) and Queue (FIFO approach i.e., First In First Out).

A queue can be implemented using an Array or Linked List.

Deque can be implemented using a Circular Array or Doubly Linked List.

10. What are the various Types of Network Topology?
In Computer Networks, there are various ways through which different components are connected. Network Topology is the way that defines the structure, and how these components are connected.

11. Sort a linked list of 0s, 1s and 2s
A Sorting Algorithm is used to rearrange a given array or list of elements according to a comparison operator on the elements. The comparison operator is used to decide the new order of elements in the respective data structure.

12. What is Breadth First Search or BFS for a Graph?
The Breadth First Search (BFS) algorithm is used to search a graph data structure for a node that meets a set of criteria. It starts at the graph’s root uniquely and visits all nodes at the current depth level before moving on to the nodes at the next depth level.

13. What’s the difference between Linear Search and Binary Search,?

Linear Search

Binary Search

In linear search, input data need not be sorted.

In binary search, input data need to be in sorted order.

The time complexity of linear search O(n).

The time complexity of binary search O(log n).

A multidimensional array can be used.

Only a single single-dimensional array is used.

Linear search performs equality comparisons

Binary search performs ordering comparisons

14: What do you mean by virtual functions in C++?
A virtual function (also known as virtual methods) is a member function that is declared within a base class and is re-defined (overridden) by a derived class.

15: What is SLIP?
SLIP stands for Serial Line Internet Protocol. It is a TCP/IP implementation that Structures was described under RFC 1055 (Request for Comments).

16: What are the various types of Tree Data Structures?
A Tree is a non-linear data structure and a hierarchy consisting of a collection of nodes such that each node of the tree stores a value and a list of references to other nodes (the “children”).

17: Sort an array according to the order defined by another array
An array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together.

18: What is an AVL tree?
An AVL tree is defined as a self-balancing Binary Search Tree (BST) where the difference between heights of left and right subtrees for any node cannot be more than one.

19: What’s the difference between Constructors and Method?

Constructors

Method

A Constructor is a block of code that initializes a newly created object.

A Method is a collection of statements that returns a value upon its execution.

A Constructor can be used to initialize an object.

A Method consists of Java code to be executed.

A Constructor is invoked implicitly by the system.

A Method is invoked by the programmer.

A Constructor is invoked when an object is created using the keyword new.

A Method is invoked through method calls.

20: What is a heap in data structures?
A Heap is a special Tree-based data structure in which the tree is a complete binary tree.

21: What is Hashing?
Hashing refers to the process of generating a fixed-size output from an input of variable size using the mathematical formulas known as hash functions. This technique determines an index or location for the storage of an item in a data structure.

22: K’th largest element in a stream
Follow the below steps to solve the problem:

  • Sort the elements in descending order
  • Print the first K numbers of the sorted array

23: What is the the Normalization Process in DBMS?
Database Normalization is a stepwise formal process that allows us to decompose database tables in such a way that both data dependency and update anomalies are minimized.

24: What is a postfix expression?
Postfix expression is the expression of the form “a b operator” (ab+) i.e., when a pair of operands is followed by an operator.

25: Longest Palindromic Substring
Follow the steps mentioned below to implement the idea:

  • Generate all the substrings.
  • For each substring, check if it is palindrome or not.
  • If the substring is Palindrome, then update the result based on the longest palindromic substring found till now.

26: What are the main features of OOPs?
Object-oriented programming generally referred to as OOPS is the backbone of Java as Java is not a purely object-oriented language but it is an object-oriented language. Java organizes a program around the various objects and well-defined interfaces.

27: Insertion in a Doubly Linked List
Add a node at the front in a Doubly Linked List:

The new node is always added before the head of the given Linked List. The task can be performed by using the following 5 steps:

  1. Firstly, allocate a new node (say new_node).
  2. Now put the required data in the new node.
  3. Make the next of new_node point to the current head of the doubly linked list.
  4. Make the previous of the current head point to new_node.
  5. Lastly, point head to new_node.

28: What do you mean by polymorphism?
The word polymorphism means having many forms. In simple words, we can define Java Polymorphism as the ability of a message to be displayed in more than one form.

29: Differentiate between the.A super key and a primary key?

Super key

Primary key

A Super Key is an attribute (or set of attributes) that is used to identify all attributes in a relation uniquely .

Primary Key is a minimal set of attributes (or sets of attributes) that is used to identify all attributes in a relation uniquely identify all attributes in a relation uniquely.

All super keys can’t be primary keys.

The primary key is a minimal super key.

Various super keys together make the criteria to select the candidate keys.

We can choose any of the minimal candidate keys to be a primary key.

In a relation, several super keys are more than several primary keys.

While in relation, the number of primary keys is less than several super keys.

30: What are the types of asymptotic notations?
Asymptotic Notations are mathematical tools that allow you to analyze an algorithm’s running time by identifying its behavior as its input size grows. This is also referred to as an algorithm’s growth rate.

31: What is Encapsulation?
Encapsulation in Java is a fundamental concept in object-oriented programming (OOP) that refers to the bundling of data and methods that operate on that data within a single unit, which is called a class in Java.

32: What is Transmission Control Protocol (TCP)?
TCP (Transmission Control Protocol) is one of the main protocols of the Internet protocol suite. It lies between the Application and Network Layers which are used in providing reliable delivery services.

33: What is a jagged array?
A jagged array is an array of arrays such that member arrays can be of different sizes, i.e., we can create a 2-D array but with a variable number of columns in each row. These types of arrays are also known as Jagged arrays.

34: Find the Maximum Depth or Height of the given Binary Tree
Follow the below steps to Implement the idea:

  • Recursively do a Depth-first search.
  • If the tree is empty then return 0
  • Otherwise, do the following
  • Get the max depth of the left subtree recursively i.e. call maxDepth( tree->left-subtree)
  • Get the max depth of the right subtree recursively i.e. call maxDepth( tree->right-subtree)
  • Get the max of max depths of left and right subtrees and add 1 to it for the current node.
  • Return max_depth.

35: What are firewalls in Computer Networks?
A firewall is a network security device, either hardware or software-based, which monitors all incoming and outgoing traffic and based on a defined set of security rules, accepts, rejects, or drops that specific traffic.

P.S: To check the JP Morgan Experiences and other asked question go through the attached link



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads