Add office photos
Engaged Employer

Jio

3.9
based on 21.6k Reviews
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

30+ Interview Questions and Answers

Updated 22 Nov 2024
Popular Designations
Q1. Triple Sum

It was Todd’s Birthday, So Bojack decided to give Todd a Binary tree with ‘N’ nodes. But the binary tree was too big to keep in his house, so Bojack decided to give exactly three nodes from that tree ...read more

Ans.

The task is to determine if it is possible to select three nodes from a binary tree such that their sum equals a given value.

  • Traverse the binary tree and store all the node values in an array

  • Use three nested loops to iterate through all possible combinations of three nodes

  • Check if the sum of the three nodes equals the given value

  • If a valid combination is found, return True

  • If no valid combination is found, return False

View 3 more answers
Q2. Inorder Traversal

You have been given a Binary Tree of 'N' nodes, where the nodes have integer values. Your task is to find the In-Order traversal of the given binary tree.

For example :
For the given binary tr...read more
Ans.

The task is to find the in-order traversal of a given binary tree.

  • Implement a recursive function to perform in-order traversal of the binary tree

  • Start from the left subtree, then visit the root, and finally visit the right subtree

  • Use an array to store the values of the nodes in the in-order traversal

View 4 more answers
Q3. Check Whether Binary tree Is Complete

You are given a binary tree. Your task is to check whether the given binary tree is a Complete Binary tree or not.

A Complete Binary tree is a binary tree whose every level,...read more

Ans.

The task is to check whether a given binary tree is a complete binary tree or not.

  • A complete binary tree is a binary tree where every level, except possibly the last, is completely filled.

  • All nodes in the last level are placed at the left end.

  • To check if a binary tree is complete, we can perform a level order traversal and check if any null nodes appear before all non-null nodes in the last level.

  • If any null nodes appear before all non-null nodes in the last level, then the b...read more

View 3 more answers
Q4. Rat in a maze

You are given a starting position for a rat which is stuck in a maze at an initial point (0, 0) (the maze can be thought of as a 2-dimensional plane). The maze would be given in the form of a squar...read more

Ans.

The task is to find all possible paths for a rat to reach its destination in a maze.

  • The maze is represented as a square matrix of 0s and 1s.

  • The rat starts at (0, 0) and the destination is at (N-1, N-1).

  • The rat can move in four directions: up, down, left, and right.

  • Use backtracking to explore all possible paths.

  • Print the paths in alphabetical order.

View 2 more answers
Discover null interview dos and don'ts from real experiences
Q5. K Closest Points to Origin

Your house is located at the origin of a 2-D plane. You have 'N' neighbours who live at 'N' different points on the plane. You want to visit exactly 'K' different neighbours who live c...read more

View 3 more answers
Q6. Zigzag Binary Tree Traversal

Given a binary tree, return the zigzag level order traversal of the nodes' values of the given tree. Zigzag traversal means starting from left to right, then right to left for the ne...read more

View 2 more answers
Are these interview questions helpful?
Q7. Technical Questions

Why is multiple inheritance not allowed in java?

What is time theta?

What are java collections?

Add your answer

Q8. Write a program to store data in a file block by block, each block containing 100 bytes. Reserve first 4 bytes for reading index, second four bytes for writing index. Here index is the block index which is read...

read more
Ans.

Program to store data in file block by block with 100 bytes per block and first 4 bytes for reading index and second 4 bytes for writing index.

  • Use file handling functions to read and write data to file

  • Use a loop to write data block by block

  • Use a counter to keep track of block index

  • Use bitwise operators to extract index from first 4 bytes

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. How you can send one file from one system to another using C program?

Ans.

Use sockets to establish a connection between two systems and transfer the file using file I/O operations.

  • Create a socket on the sender system using socket() function.

  • Bind the socket to a port using bind() function.

  • Establish a connection to the receiver system using connect() function.

  • Open the file to be transferred using fopen() function.

  • Read the file contents using fread() function.

  • Send the file contents using send() function.

  • Receive the file contents on the receiver system...read more

Add your answer

Q10. What is difference between path and classpath variables

Ans.

Path variable is used to locate executable files while classpath variable is used to locate Java classes.

  • Path variable is used by the operating system to locate executable files.

  • Classpath variable is used by Java to locate classes and resources.

  • Path variable is system-specific while classpath variable is Java-specific.

  • Path variable is set by the user while classpath variable is set by the developer.

  • Example of path variable: C:\Windows\System32

  • Example of classpath variable: C:...read more

Add your answer
Q11. System Design Question

Building a product , best practices

Add your answer

Q12. How does static and extern differ from one another

Ans.

Static and extern are storage classes in C/C++ with different functionalities.

  • Static variables have a local scope but retain their value between function calls.

  • Extern variables are declared outside a function and can be accessed by other files.

  • Static functions can only be called within the same file they are declared in.

  • Extern functions are declared in one file and can be used in other files.

  • Static classes and functions are used to restrict access to certain parts of the code...read more

Add your answer

Q13. Is java completely object oriented?

Ans.

Yes, Java is completely object oriented.

  • Java is designed to be completely object oriented.

  • All code in Java is written inside classes and objects.

  • Java supports encapsulation, inheritance, and polymorphism.

  • Java does have some non-object oriented features like primitive data types.

  • However, even these can be treated as objects using wrapper classes.

Add your answer

Q14. What is half duplex and full duplex ?

Ans.

Half duplex allows communication in both directions, but only one direction at a time. Full duplex allows simultaneous communication in both directions.

  • Half duplex is like a walkie-talkie where only one person can speak at a time.

  • Full duplex is like a phone call where both parties can speak and listen at the same time.

  • Examples of half duplex devices include Ethernet hubs and some two-way radios.

  • Examples of full duplex devices include Ethernet switches and telephones.

Add your answer

Q15. What are the storage classes in C.

Ans.

C has four storage classes: auto, register, static, and extern.

  • Auto: default storage class for local variables

  • Register: stores variables in CPU registers for faster access

  • Static: retains value between function calls

  • Extern: used to access global variables across multiple files

Add your answer

Q16. Build stack from scratch without using custom data structures

Ans.

Implementing a stack using arrays without custom data structures

  • Use an array to store the elements of the stack

  • Keep track of the top of the stack using a variable

  • Implement push operation by adding elements to the end of the array

  • Implement pop operation by removing elements from the end of the array

Add your answer

Q17. Do you know STL. Find loop in linked list.

Ans.

STL knowledge and finding loop in linked list

  • STL (Standard Template Library) is a C++ library that provides containers, algorithms, and iterators.

  • To find a loop in a linked list, we can use Floyd's cycle-finding algorithm.

  • In this algorithm, we use two pointers, one moving at a slower pace and the other at a faster pace.

  • If there is a loop in the linked list, the faster pointer will eventually catch up to the slower pointer.

  • We can then reset one of the pointers to the head of t...read more

Add your answer

Q18. what is different between Mysql Vs sql ?

Ans.

MySQL is a specific implementation of SQL, which is a standardized language for managing databases.

  • MySQL is a specific relational database management system (RDBMS) that uses SQL as its query language.

  • SQL (Structured Query Language) is a standardized language for managing databases, used by various RDBMS like MySQL, Oracle, and SQL Server.

  • MySQL is open-source and free to use, while some other RDBMS like Oracle may require a license.

  • MySQL has specific features like InnoDB stor...read more

Add your answer

Q19. what abstraction and interface in java?

Ans.

Abstraction and interface are key concepts in Java for achieving abstraction and defining contracts for classes.

  • Abstraction in Java is achieved using abstract classes and interfaces.

  • Abstract classes can have both abstract and concrete methods, while interfaces can only have abstract methods.

  • Interfaces define contracts that classes must implement, allowing for polymorphism and loose coupling.

  • Example: interface Shape { void draw(); }

  • Example: abstract class Animal { abstract voi...read more

Add your answer

Q20. Linkedlist add and delete node concept with code

Ans.

Linkedlist add and delete node concept with code

  • To add a node to a linked list, create a new node and update the next pointer of the current last node to point to the new node

  • To delete a node from a linked list, update the next pointer of the previous node to skip over the node to be deleted

Add your answer

Q21. What is exception in java?

Ans.

Exception is an event that occurs during the execution of a program and disrupts the normal flow of instructions.

  • Exceptions are objects that are thrown at runtime when an abnormal condition occurs

  • Java provides a set of predefined exceptions that can be used to handle errors

  • Exceptions can be caught and handled using try-catch blocks

  • Unchecked exceptions are those that are not checked at compile-time, while checked exceptions are checked at compile-time

Add your answer

Q22. What is binary tree and implement

Ans.

A binary tree is a data structure where each node has at most two children.

  • Consists of nodes, each with a left and right child pointer

  • Root node is the topmost node

  • Traversal methods include in-order, pre-order, and post-order

Add your answer

Q23. What is 2 phase commit

Ans.

2 phase commit is a protocol used to ensure distributed transactions are either committed or rolled back.

  • Used in distributed systems where multiple databases are involved in a transaction

  • Ensures all databases either commit or rollback the transaction

  • Involves a coordinator and multiple participants

  • Coordinator sends a prepare message to participants, who respond with either commit or abort

  • If all participants respond with commit, the coordinator sends a commit message

  • If any part...read more

Add your answer

Q24. What is serial protocol?

Ans.

Serial protocol is a communication protocol used to transmit data between devices one bit at a time.

  • Serial protocol is used in many applications such as RS-232, SPI, I2C, and USB.

  • It is a simple and reliable way to transmit data over a long distance.

  • Serial protocol can be synchronous or asynchronous.

  • It is commonly used in embedded systems and communication between microcontrollers and sensors.

Add your answer

Q25. How to handle dead locks?

Ans.

Deadlocks can be handled by using techniques like prevention, avoidance, detection, and recovery.

  • Use prevention techniques like ensuring a strict ordering of resource requests to avoid circular wait.

  • Implement avoidance techniques like ensuring that resources are only allocated if they can be used without causing a deadlock.

  • Detect deadlocks by periodically checking for circular wait conditions and taking appropriate actions.

  • Recover from deadlocks by aborting one or more proces...read more

Add your answer

Q26. What is race condition?

Ans.

Race condition is a situation in which the outcome of a program depends on the order of execution of its threads.

  • Occurs when multiple threads access shared data and try to change it at the same time

  • Can lead to unpredictable behavior and bugs in the program

  • Prevented by using synchronization techniques like locks and semaphores

Add your answer

Q27. 1-balance binary tree after deletion of node

Ans.

To balance a binary tree after deletion of a node, we can use rotations and reordering of nodes.

  • Perform rotations to maintain balance factor of nodes

  • Reorder nodes to ensure tree remains balanced

  • Examples: AVL tree, Red-Black tree

Add your answer

Q28. What is enum in java

Ans.

Enum is a special data type in Java used to define a set of constants.

  • Enums are used to represent a fixed number of values that do not change.

  • They are declared using the enum keyword.

  • Each enum constant is an object of the enum type.

  • Enums can have constructors, methods, and fields.

  • Example: enum Color { RED, GREEN, BLUE }

  • Enums can also have values associated with them, like Color.RED(255, 0, 0).

Add your answer

Q29. able to handle work pressure?

Ans.

Yes, I am able to handle work pressure.

  • I prioritize tasks and manage my time effectively

  • I communicate with my team and ask for help when needed

  • I take breaks and practice stress-relieving techniques

  • I stay organized and focused on the end goal

Add your answer
Q30. Frontend problem
Add your answer

Q31. what is mean by JSP?

Ans.

JSP stands for JavaServer Pages, a technology used for creating dynamic web pages.

  • JSP allows embedding Java code in HTML pages

  • It simplifies the process of creating dynamic web content

  • JSP files are compiled into servlets by the server for execution

Add your answer

Q32. What is deadlock

Ans.

Deadlock is a situation in which two or more processes are unable to proceed because each is waiting for the other to release a resource.

  • Occurs in multitasking environments

  • Caused by a circular dependency of resources

  • Can be resolved by using techniques like resource allocation graph

  • Example: Process A holds Resource 1 and waits for Resource 2, while Process B holds Resource 2 and waits for Resource 1

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

Interview Process at null

based on 8 interviews in the last 1 year
2 Interview rounds
Coding Test Round
One-on-one Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

3.7
 • 115 Interview Questions
3.9
 • 38 Interview Questions
3.8
 • 24 Interview Questions
3.6
 • 22 Interview Questions
3.7
 • 18 Interview Questions
3.5
 • 14 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