Add office photos
Employer?
Claim Account for FREE

Myntra

4.0
based on 1.9k Reviews
Filter interviews by

70+ Axis Bank Interview Questions and Answers

Updated 1 Sep 2024
Popular Designations
Q1. Move All Negative Numbers To Beginning And Positive To End

You are given an array 'ARR' consisting of 'N' integers. You need to rearrange the array elements such that all negative numbers appear before all posit...read more

View 5 more answers
Q2. Reverse Linked List

Given a singly linked list of integers. Your task is to return the head of the reversed linked list.

For example:
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked lis...read more
View 6 more answers
Q3. Preorder traversal of a BST

You have been given an array/list 'PREORDER' representing the preorder traversal of a BST with 'N' nodes. All the elements in the given array have distinct values.

Your task is to con...read more

View 3 more answers
Q4. Pair Sum

You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to return the list of all pairs of elements such that each sum of elements of each pair equals 'S'.

Note:

Each pair shou...read more
View 4 more answers
Discover Axis Bank interview dos and don'ts from real experiences
Q5. Dijkstra's shortest path

You have been given an undirected graph of ‘V’ vertices (labeled 0,1,..., V-1) and ‘E’ edges. Each edge connecting two nodes (‘X’,’Y’) will have a weight denoting the distance between no...read more

View 3 more answers
Q6. Search In Rotated Sorted Array

Aahad and Harshit always have fun by solving problems. Harshit took a sorted array and rotated it clockwise by an unknown amount. For example, he took a sorted array = [1, 2, 3, 4,...read more

View 3 more answers
Are these interview questions helpful?
Q7. Flip Bits

You are given an array of integers ARR[] of size N consisting of zeros and ones. You have to select a subset and flip bits of that subset. You have to return the count of maximum one’s that you can obt...read more

View 3 more answers
Q8. Validate BST

Given a binary tree with N number of nodes, check if that input tree is BST (Binary Search Tree) or not. If yes, return true, return false otherwise.

A binary search tree (BST) is a binary tree data...read more

View 3 more answers
Share interview questions and help millions of jobseekers 🌟
Q9. Element that appears once

You are given an arbitrary array ‘arr’ consisting of N non-negative integers, where every element appears thrice except one. You need to find the element that appears only once.

Input F...read more
View 4 more answers
Q10. Longest Common Subsequence

You have been given two Strings “STR1” and “STR2” of characters. Your task is to find the length of the longest common subsequence.

A String ‘a’ is a subsequence of a String ‘b’ if ‘a’...read more

View 5 more answers
Q11. Maximum Frequency Number

Ninja is given an array of integers that contain numbers in random order. He needs to write a program to find and return the number which occurs the maximum times in the given input. He ...read more

View 3 more answers
Q12. Sort an array in wave form

You have been given an unsorted array ‘ARR’.

Your task is to sort the array in such a way that the array looks like a wave array.

Example:
If the given sequence ‘ARR’ has ‘N’ elements ...read more
View 4 more answers
Q13. Convert Sorted Array to BST

You have been given a sorted array of length ‘N’. You need to construct a balanced binary search tree from the array. If there can be more than one possible tree, then you can return ...read more

View 3 more answers
Q14. Tree Traversals

You have been given a Binary Tree of 'N' nodes, where the nodes have integer values. Your task is to find the ln-Order, Pre-Order, and Post-Order traversals of the given binary tree.

For example ...read more
View 4 more answers
Q15. Add two number as linked lists

You have been given two singly Linked Lists, where each of them represents a positive number without any leading zeros.

Your task is to add these two numbers and print the summatio...read more

View 3 more answers
Q16. DFS Traversal

Given an undirected and disconnected graph G(V, E), containing 'V' vertices and 'E' edges, the information about edges is given using 'GRAPH' matrix, where i-th edge is between GRAPH[i][0] and GRAP...read more

View 2 more answers
Q17. Convert A Given Binary Tree To Doubly Linked List

Given a Binary Tree, convert this binary tree to a Doubly Linked List.

A Binary Tree (BT) is a data structure in which each node has at most two children.

A Doub...read more

View 3 more answers
Q18. Sum Of Max And Min

You are given an array “ARR” of size N. Your task is to find out the sum of maximum and minimum elements in the array.

Follow Up:
Can you do the above task in a minimum number of comparisons? ...read more
View 4 more answers
Q19. BFS in Graph

You are given an undirected and disconnected graph G(V, E) having V vertices numbered from 0 to V-1 and E edges. Your task is to print its BFS traversal starting from the 0th vertex.

BFS or Breadth-...read more

View 2 more answers
Q20. Convert a binary tree to its sum tree

Given a binary tree of integers, you are supposed to modify the given binary tree to a sum tree where each node value is replaced by the sum of the values of both left and r...read more

View 2 more answers
Q21. Rabbit Jumping

You are given ‘n’ carrots numbered from 1 to ‘n’. There are k rabbits. Rabbits can jump to carrots only with the multiples of Aj(Aj,2Aj,3Aj…) for all rabbits from 1 to k.

Whenever Rabbit reaches a...read more

View 3 more answers
Q22. Delete N nodes after M nodes of a linked list

You have given a singly linked list and two integers 'N' and 'M'. Delete 'N' nodes after every 'M' node, or we can say more clearly that traverse the linked list suc...read more

View 2 more answers
Q23. Rearrange Array Numbers to form Largest Possible Number

You are given an array(ARR) of length 'N', consisting of non-negative integers. Using only these given numbers, rearrange the numbers in such a way that th...read more

View 2 more answers
Q24. Running Median

You are given a stream of 'N' integers. For every 'i-th' integer added to the running list of integers, print the resulting median.

Input Format :
The fi...read more
View 4 more answers
Q25. Invert a Binary Tree

You are provided with a Binary Tree and one of its leaf nodes. You have to invert this binary tree. Inversion must be done by following all the below guidelines:

• The given leaf node become...read more
Add your answer
Q26. Puzzle

Two boys A and B enter a tunnel . At 2/3rd of the tunnel, they see a train coming towards the tunnel ,the train is still at a distance from the tunnel . A runs back to that end of the tunnel from which th...read more

Add your answer
Q27. Puzzle

A man lives on the 12th floor . Everyday he uses the lift ,comes to the ground floor and goes to office. On his return ,three cases are seen:
1.Whenever he is with someone in the elevator he takes the lift...read more

Add your answer
Q28. System Design Question

Design a website where after user request. A bunch of processes need to be executed and then a mail is sent to user with the result. Take care of scalability etc?

Add your answer

Q29. given an array of length n and in which numbers from 1-n will be there and each number can repeat any number of times find out which repeated more number of times

Ans.

Find the most repeated number in an array of length n with numbers 1-n.

  • Create a dictionary to store the count of each number in the array

  • Iterate through the array and update the count in the dictionary

  • Find the key with the highest count in the dictionary

Add your answer
Q30. Puzzle

Given a cylindrical glass of water, how would you conclude whether it is more than half filled ,or less than half filled. The glass is not transparent and you do not have any measuring instrument. And you...read more

Add your answer

Q31. given an array of numbers in which duplicates are there and one triplicate is there. find that number

Ans.

Find the triplicate number in an array of duplicates.

  • Iterate through the array and keep track of the frequency of each number.

  • Return the number that appears three times.

  • If no number appears three times, return null.

Add your answer
Q32. Java Question

String pool and how garbage collection functionality works?

Add your answer
Q33. Puzzle

Given a biased coin, how would you take an unbiased decision .You don’t know whether it is biased towards heads or tails.

Add your answer

Q34. given a linked list with 2 parameters m,n. Now start reversing the m nodes and leave n nodes and continue it till u reach the end

Ans.

Reverse m nodes and leave n nodes in a linked list till the end.

  • Traverse the linked list till m nodes and reverse them

  • Traverse n nodes and continue reversing m nodes

  • Repeat the above step till the end of the linked list

  • Handle edge cases like m or n being greater than the length of the linked list

Add your answer

Q35. All the leaf nodes of tree are doubly linked,print only the leaf nodes of a tree

Ans.

Print only the leaf nodes of a doubly linked tree.

  • Traverse the tree and check if a node has no children and both left and right pointers are null.

  • If yes, then it is a leaf node and print it.

  • If no, then continue traversing the tree.

  • Use recursion to traverse the tree in a depth-first manner.

Add your answer

Q36. Where does session id is stored in php? How server identifies request has come from which client and many other related questions?

Ans.

Session ID is stored in PHP as a cookie or a query parameter.

  • Session ID can be stored as a cookie in the client's browser.

  • Session ID can also be stored as a query parameter in the URL.

  • The server identifies the client by retrieving the session ID from the cookie or query parameter.

  • The session ID is then used to retrieve the corresponding session data stored on the server.

  • The server can also use other methods like IP address or user agent to identify the client.

Add your answer
Q37. Java Question

How to synchronize HashMap in Java?

Add your answer

Q38. Given an array of +ve and -ve numbers , have to rearrange them ( like +ve numbers to left and -ve numbers to right of the array)

Ans.

Rearrange an array of positive and negative numbers with positive numbers on the left and negative numbers on the right.

  • Create two empty arrays, one for positive numbers and one for negative numbers

  • Loop through the original array and add positive numbers to the positive array and negative numbers to the negative array

  • Concatenate the positive and negative arrays to create the rearranged array

Add your answer

Q39. String pool and how garbage collection functionality works?

Ans.

String pool is a cache of string literals in memory. Garbage collection frees up memory by removing unused objects.

  • String pool is a cache of string literals in memory

  • Strings are immutable and can be shared among multiple objects

  • Garbage collection removes unused objects to free up memory

  • String objects that are no longer referenced are eligible for garbage collection

Add your answer

Q40. Find 2 elements in array whose sum is equal to given number?

Ans.

The question asks to find two elements in an array whose sum is equal to a given number.

  • Iterate through the array and for each element, check if the difference between the given number and the current element exists in the array.

  • Use a hash set to store the elements as you iterate through the array for efficient lookup.

  • Return the pair of elements if found, otherwise return a message indicating no such pair exists.

Add your answer

Q41. Change Binary tree so that parent node is the sum of root nodes

Ans.

Change binary tree to make parent node the sum of root nodes

  • Traverse the tree in post-order

  • For each node, update its value to the sum of its children

  • Return the updated root node

Add your answer

Q42. Build a bst out of the unsorted array by looping over the array and inserting each element to the tree?

Ans.

Yes

  • Create an empty binary search tree (BST)

  • Loop over the unsorted array

  • For each element, insert it into the BST using the appropriate insertion logic

  • Repeat until all elements are inserted

  • The resulting BST will be built from the unsorted array

Add your answer

Q43. explain all the serach algorithm you know with space and Time complexities

Ans.

Explanation of search algorithms with their space and time complexities.

  • Linear Search - O(n) time complexity, O(1) space complexity

  • Binary Search - O(log n) time complexity, O(1) space complexity

  • Jump Search - O(√n) time complexity, O(1) space complexity

  • Interpolation Search - O(log log n) time complexity, O(1) space complexity

  • Exponential Search - O(log n) time complexity, O(1) space complexity

  • Fibonacci Search - O(log n) time complexity, O(1) space complexity

Add your answer
Q44. Java Question

Singleton pattern, observer pattern?

Add your answer
Q45. OS Question

Difference between process and thread

Add your answer

Q46. Inorder Travesal of a tree without recursion(write the code)

Ans.

Inorder traversal of a tree without recursion

  • Create an empty stack and initialize current node as root

  • Push the current node to stack and set current = current.left until current is NULL

  • If current is NULL and stack is not empty, pop the top item from stack, print it and set current = popped_item.right

  • Repeat step 2 and 3 until stack is empty

Add your answer

Q47. Indexing in mysql? How many types of indexing in mysql?

Ans.

Indexing in MySQL improves query performance. There are several types of indexing in MySQL.

  • Indexes are used to quickly locate data without scanning the entire table.

  • Types of indexing in MySQL include B-tree, hash, full-text, and spatial indexes.

  • B-tree indexes are the most common and suitable for most use cases.

  • Hash indexes are used for exact match lookups.

  • Full-text indexes are used for searching text-based data efficiently.

  • Spatial indexes are used for optimizing spatial queri...read more

Add your answer

Q48. What is the difference between get and post?

Ans.

GET is used to retrieve data from a server, while POST is used to send data to a server.

  • GET requests are idempotent, meaning they can be repeated without changing the result

  • POST requests are not idempotent and can have side effects on the server

  • GET requests can be cached by the browser, while POST requests cannot

  • GET requests have limitations on the amount of data that can be sent, while POST requests have no limitations

  • GET requests should not be used for sensitive data, as th...read more

Add your answer

Q49. Process vs Thread differences and synchronization,deadlock examples?

Ans.

Process vs Thread differences and synchronization, deadlock examples

  • Process is an instance of a program while thread is a subset of a process

  • Processes are independent while threads share the same memory space

  • Synchronization is used to coordinate access to shared resources

  • Deadlock occurs when two or more threads are blocked waiting for each other to release resources

  • Examples of synchronization include mutex, semaphore, and monitor

  • Examples of deadlock include dining philosopher...read more

Add your answer
Q50. DBMS Questions

Design with one-one mapping, one-many mapping…some basic questions

Add your answer
Q51. DBMS Question

What is indexing?

Add your answer

Q52. Can trigger be used with select statement?

Ans.

Yes, triggers can be used with select statements in SQL.

  • Triggers are database objects that are automatically executed in response to certain events, such as insert, update, or delete operations.

  • While triggers are commonly used with insert, update, and delete statements, they can also be used with select statements.

  • Using triggers with select statements allows you to perform additional actions or validations before or after the select operation.

  • For example, you can use a trigge...read more

Add your answer

Q53. LRU page Replacement Algorithm for large data

Ans.

LRU page replacement algorithm is used to replace the least recently used page in memory with a new page.

  • LRU stands for Least Recently Used

  • It is a cache eviction algorithm

  • It is used to manage memory in operating systems

  • It works by keeping track of the pages that are used recently and the ones that are not

  • When a new page is to be loaded into memory, the algorithm checks which page has not been used for the longest time and replaces it with the new page

Add your answer
Q54. DBMS Question

Advantages of B+ Tree

Add your answer

Q55. Can constructor be declared as private?

Ans.

Yes, a constructor can be declared as private.

  • Declaring a constructor as private restricts its accessibility to only the class itself.

  • This can be useful in scenarios where you want to control the creation of objects of that class.

  • Private constructors are commonly used in singleton design pattern implementations.

  • Example: private constructor in a singleton class:

  • class Singleton { private Singleton() {} }

Add your answer

Q56. Given a string of paranthesis tell longest valid parantheisis

Ans.

Use stack to keep track of indices of opening parentheses, update max length when closing parentheses found

  • Use a stack to keep track of indices of opening parentheses

  • When a closing parentheses is found, update max length by calculating the difference between current index and top of stack

  • Handle edge cases like extra closing parentheses or unmatched opening parentheses

  • Example: Input: "(()()", Output: 4 (for "()()")

Add your answer

Q57. Cookie in php? Size of the cookie, expiry etc?

Ans.

A cookie in PHP is a small piece of data stored on the client's computer. It has a size limit and an expiry date.

  • A cookie is used to store information on the client's computer for future use.

  • In PHP, cookies are set using the setcookie() function.

  • The size of a cookie is limited to 4KB.

  • Cookies can have an expiry date, after which they are no longer valid.

  • The expiry date can be set using the 'expires' parameter in the setcookie() function.

  • If no expiry date is set, the cookie wil...read more

Add your answer

Q58. Given a string find longest palindromeic substring

Ans.

Find the longest palindromic substring in a given string.

  • Use dynamic programming to check for palindromes within the string.

  • Start by checking for palindromes of length 1 and 2, then expand to longer substrings.

  • Keep track of the longest palindrome found so far.

Add your answer

Q59. Can a constructor be private?

Ans.

Yes, a constructor can be private.

  • A private constructor can only be accessed within the class itself.

  • It is often used in singleton design pattern to restrict object creation.

  • Private constructors are also useful for utility classes that only contain static methods.

Add your answer

Q60. What is session in php?

Ans.

Session in PHP is a way to store and retrieve data for a user across multiple requests.

  • Sessions are used to maintain user-specific data on the server side.

  • A session is created for each user and is identified by a unique session ID.

  • Session data can be stored in server files or in a database.

  • Session variables can be accessed and modified throughout the user's session.

  • Sessions can be used to implement features like user authentication and shopping carts.

Add your answer

Q61. How many types of trigger?

Ans.

There are two types of triggers: DML triggers and DDL triggers.

  • DML triggers are fired in response to DML (Data Manipulation Language) statements like INSERT, UPDATE, DELETE.

  • DDL triggers are fired in response to DDL (Data Definition Language) statements like CREATE, ALTER, DROP.

  • Examples: A DML trigger can be used to log changes made to a table, while a DDL trigger can be used to enforce certain rules when a table is altered.

Add your answer

Q62. Inorder Traversal of a tree

Ans.

Inorder traversal is a way of visiting all nodes in a binary tree by visiting the left subtree, then the root, and then the right subtree.

  • Start at the root node

  • Traverse the left subtree recursively

  • Visit the root node

  • Traverse the right subtree recursively

  • Repeat until all nodes have been visited

Add your answer

Q63. PreOrder traversal without recursion?

Ans.

PreOrder traversal without recursion is done using a stack to simulate the function call stack.

  • Create an empty stack and push the root node onto it.

  • While the stack is not empty, pop a node from the stack and process it.

  • Push the right child of the popped node onto the stack if it exists.

  • Push the left child of the popped node onto the stack if it exists.

Add your answer

Q64. Reverse a linkedlist ?

Ans.

Reverse a linkedlist by changing the direction of pointers.

  • Iterate through the linkedlist and change the direction of pointers.

  • Keep track of previous, current and next nodes.

  • Set the next pointer of current node to previous node.

  • Move to next node and repeat until end of list is reached.

Add your answer

Q65. Linked List in a binary tree

Ans.

A linked list can be implemented in a binary tree by using the left child as the next node and the right child as the previous node.

  • Each node in the binary tree will have a left child pointer and a right child pointer.

  • Traversal of the linked list can be done by following the left child pointers.

  • Example: In a binary tree, the left child of a node can point to the next node in the linked list.

Add your answer

Q66. 3 sum Trapping rain water

Ans.

3 sum and trapping rain water are common coding interview questions that test problem-solving skills.

  • 3 sum problem involves finding three numbers in an array that add up to a target sum.

  • Trapping rain water problem involves calculating the amount of water that can be trapped between bars in an elevation map.

  • Both problems require efficient algorithms to solve.

Add your answer

Q67. Engines in mysql?

Ans.

Engines in MySQL are the underlying software components that handle storage, indexing, and querying of data.

  • MySQL supports multiple storage engines, each with its own strengths and features.

  • Some commonly used engines in MySQL are InnoDB, MyISAM, and Memory.

  • InnoDB is the default engine in MySQL and provides support for transactions and foreign keys.

  • MyISAM is known for its simplicity and speed but lacks transaction support.

  • Memory engine stores data in memory for faster access b...read more

Add your answer

Q68. Triggers in mysql?

Ans.

Triggers in MySQL are database objects that are automatically executed in response to specified events.

  • Triggers are used to enforce business rules, maintain data integrity, and automate tasks.

  • They can be defined to execute before or after an INSERT, UPDATE, or DELETE operation.

  • Triggers can be written in SQL or in a programming language like PL/SQL.

  • Examples of trigger events include inserting a new record, updating a record, or deleting a record.

  • Triggers can be used to perform...read more

Add your answer

Q69. Indexing in mysql?

Ans.

Indexing in MySQL improves the performance of database queries by creating a data structure that allows for faster data retrieval.

  • Indexes are created on one or more columns of a table.

  • They help in speeding up the search, sorting, and joining of data.

  • Indexes can be created using the CREATE INDEX statement.

  • Common types of indexes include B-tree, hash, and full-text indexes.

  • Indexes should be used judiciously as they consume disk space and require additional maintenance.

Add your answer

Q70. implement LRU cache

Ans.

LRU cache is a data structure that stores the most recently used items, discarding the least recently used items when full.

  • Use a combination of a doubly linked list and a hashmap to efficiently implement LRU cache.

  • When an item is accessed, move it to the front of the linked list to mark it as the most recently used.

  • When adding a new item, check if the cache is full. If so, remove the least recently used item from the end of the linked list and hashmap.

  • Keep track of the size o...read more

Add your answer

Q71. right view of a Tree

Ans.

The right view of a tree shows the nodes that are visible when looking at the tree from the right side.

  • The right view of a tree can be obtained by performing a level order traversal and keeping track of the rightmost node at each level.

  • Example: For a tree with nodes 1, 2, 3, 4, 5, the right view would be 1, 3, 5.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Axis Bank

based on 6 interviews in the last 1 year
2 Interview rounds
Technical Round 1
Technical Round 2
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

3.5
 • 55 Interview Questions
3.1
 • 39 Interview Questions
3.5
 • 26 Interview Questions
3.4
 • 14 Interview Questions
4.0
 • 14 Interview Questions
3.1
 • 10 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter