- Prepare
All Platforms Programming Aptitude Syllabus Interview Preparation Interview Exp. Off Campus - Prime Video
- Prime Mock

- Interview Experience
- Prime VideoNew
- Prime Mock
- Interview Prep
- Nano Degree
- Prime Video
- Prime Mock

# Reliance Jio Technical Interview Questions

## Reliance Jio Technical Interview Questions 2023

This page contains the most recently asked technical questions and answers in the Reliance Jio Technical Interview 2023.

All of the questions listed below were collected by students recently placed at Reliance Jio.

## Top 20 Reliance Jio Technical Interview Questions

#### Question 1: Which Data Structure Should be Used for LRU Cache Implementation?

Answer:

The LRU cache is implemented using two data structures:

**Queue:** A queue is implemented using a doubly-linked list. The number of accessible frames will be the same as the maximum queue size (cache size). The pages with the most recent usage will be in the back, while the pages with the least recent usage will be in the front.

**Hash:** A hash in which the page number is the key and the queue node’s address is the value.

#### Question 2:- What is runtime polymorphism in Java?

Answer:

**Runtime Polymorphism:**

A call to an overridden method is resolved at runtime rather than at compile time in runtime polymorphism. Runtime polymorphism is another term for the Dynamic Method Dispatch method.

A superclass’s reference variable is referred to as an overridden method in this function.

The reference variable object is used to identify which method should be performed.

#### Question 3: What is a Red-Black Tree in context to data structures?

Answer:

A red-black tree is a self-balancing binary search tree that has an extra bit at each node that is often read as the color (red or black). These colors are used to maintain the balance of the tree as additions and deletions are done. The balance of the tree isn’t perfect, but it’s sufficient to shorten search times and keep them around O(log n), where n is the total number of nodes in the tree.

Points to remember:

- A red-black tree features nodes that are either red or black in hue.
- The tree’s root is usually black.
- There are no red nodes that are close to one another (A red node is not allowed to have a red parent or red child).
- There is the same number of black nodes on every path from a node (including the root) to any of its descendant’s NULL nodes.

#### Questions 4: What is the final variable?

Answer:

The final variable is used to prevent users from making changes to it. Once the final variable has been assigned, it cannot be modified again.

#### Question 5: What are BFS (Breadth First Search) and DFS (Depth First Search) in the context of graph traversal.

Answer:

**Breadth First Search:**BFS is a vertex-based technique that starts at the root of the tree and visits all nodes at the current depth level before moving on to nodes at the next depth level. It uses a data structure called a queue that follows the first-in, first-out principle. BFS visits and marks one vertex at a time, then its neighbors, who are likewise visited and queued.**Depth First Search:**Depth First Search (DFS) is an edge-based approach. It employs the Stack data structure and operates in two stages:- Visited vertices are added to the stack.
- Visited vertices are popped if no vertices are found.

#### Question 6: Write a program to count distinct elements in an array.

#### Question 7: Write a JAVA program to check whether a number of automorphic numbers or not.

public class Main { public static void main(String[] args) { int n = 376, sq = n * n ; if(isAutomorphic(n) == 1) System.out.println("Num: "+ n + ", Square: " + sq + " - is Automorphic"); else System.out.println("Num: "+ n + ", Square: " + sq + " - is not Automorphic"); } static int isAutomorphic(int n){ int square = n * n; while(n != 0) { // means not automorphic number if(n % 10 != square % 10){ return 0; } // reduce down numbers n /= 10; square /= 10; } // if reaches here means the automorphic number return 1; } }

#### Question 8: Write a program to find the equilibrium index of an array.

#### Question 9: Write a program to toggle each character in a string using C++.

#include <iostream> #include <string.h> using namespace std; int main() { //Initializing variable. char str[100]; int i; //Accepting input. cout<<"Enter the String: "; gets(str); //Initializing for loop. for (i = 0; str[i]!='\0'; i++) { //Toggling characters. if(str[i] >= 'A' && str[i] <= 'Z') { str[i] = str[i] + 32; } else if(str[i] >= 'a' && str[i] <= 'z') { str[i] = str[i] - 32; } } cout<<"\nToggled string: "<<str<<endl; //Printing toggled string. return 0; }

#### Question 10: Write a program to check whether a number Harshad number or not.

#### Question 11: List the different categories of joins.

Answer:

The many types of joins are as follows:

**INNER JOIN:**INNER JOIN returns rows when both tables match.**LEFT JOIN:**Even if there are no matches in the right table, the LEFT JOIN retrieves all rows from the left table.**RIGHT JOIN:**Even if there are no matches in the left table, the RIGHT JOIN returns all rows from the right table.**FULL OUTER JOIN:**FULL OUTER JOIN returns rows when one of the tables matches.**SELF JOIN:**A SELF JOIN connects two tables as if they were one, temporarily renaming at least one of them.**CARTESIAN JOIN (CROSS JOIN):**The Cartesian product of the sets of values in two or more related tables is returned by the CARTESIAN JOIN (CROSS JOIN).

#### Question 12: Write a program to find the “Kth” maximum and minimum element of an array using C++.

#includeusing namespace std; int main(){ int n; cin>>n; vectorarr(n); for(int i=0; i >arr[i]; int k; cin>>k; set s(arr.begin(), arr.end()); set::iterator itr = s.begin(); // s.begin() returns a pointer to first element in the set advance(itr, k - 1); //itr points to kth element (minimum)in set cout <<"Minimum :"<< *itr << "\n"; itr = s.begin(); advance(itr, n-k); //itr points to kth element (maximum)in set cout <<"Maximum :"<< *itr << "\n"; return 0; }

#### Question 13: Write a code for Kadane’s algorithm.

#### Question 14: Write a JAVA program to find the next permutation.

import java.util.Arrays; public class Main { public static int[] swap(int data[], int left, int right) { // Swap the data int temp = data[left]; data[left] = data[right]; data[right] = temp; // Return the updated array return data; } public static int[] reverse(int data[], int left, int right) { // Reverse the sub-array while (left < right) { int temp = data[left]; data[left++] = data[right]; data[right--] = temp; } // Return the updated array return data; } public static boolean findNextPermutation(int data[]) { if (data.length <= 1) return false; int last = data.length - 2; while (last >= 0) { if (data[last] < data[last + 1]) { break; } last--; } if (last < 0) return false; int nextGreater = data.length - 1; // Find the rightmost successor to the pivot for (int i = data.length - 1; i > last; i--) { if (data[i] > data[last]) { nextGreater = i; break; } } data = swap(data, nextGreater, last); data = reverse(data, last + 1, data.length - 1); return true; } // Driver Code public static void main(String args[]) { int data[] = {1, 2, 3, 7}; if (!findNextPermutation(data)) System.out.println("There is no higher" + " order permutation " + "for the given data."); else { System.out.println(Arrays.toString(data)); } } }

#### Question 15: Write a program for finding the sum of all nodes in a binary tree.

#### Question 16: Write a JAVA program for trapping rainwater problem.

public class Main { public static int maxWater(int[] arr, int n) { // To store the maximum water // that can be stored int res = 0; // For every element of the array // except first and last element for (int i = 1; i < n - 1; i++) { // Find maximum element on its left int left = arr[i]; for (int j = 0; j < i; j++) { left = Math.max(left, arr[j]); } // Find maximum element on its right int right = arr[i]; for (int j = i + 1; j < n; j++) { right = Math.max(right, arr[j]); } // Update maximum water value res += Math.min(left, right) - arr[i]; } return res; } // Driver code public static void main(String[] args) { int[] arr = {0, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1}; int n = arr.length; System.out.print(maxWater(arr, n)); } }

#### Question 17: Write a code for spiral transversal on a matrix.

#### Question 18: Define Version Control System(VCS).

Answer:

A version control system is defined as a system that maintains track of all changes made to a given project and also assists us in determining whether all developers in a team are working on the same project or not. It manages the history of all activities performed, giving a developer confidence to repair a bug, make modifications, or run a test knowing that if something goes wrong, past work may be restored at any time.

#### Question 19: What is Hybrid Approach in software testing?

Answer:

The hybrid approach in software testing, as the name implies, is a combo of top-down and bottom-up approaches. Sandwich integration testing or Mixed Integration testing are other names for it.

#### Question 20:- State the properties of B Tree.

Answer:

A “B tree” of order m has all of the attributes of a M way tree. It also has the following characteristics.

- Each node in a B-Tree has a maximum of m children.
- Every node in a B-Tree, except the root and leaf nodes, has at least m/2 children.
- At least two root nodes are required.
- All leaf nodes must have the same level.

Login/Signup to comment