Add office photos
Employer?
Claim Account for FREE

PayPal

3.9
based on 919 Reviews
Video summary
Filter interviews by

10+ Jnanada IT Solutions Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Sum Queries in a Sorted Array

Given two arrays arr and queries, your task is to determine the sum of all elements in arr that are less than or equal to each element in queries. The array arr is provided in sort...read more

Ans.

Find sum of elements in a sorted array less than or equal to each element in queries.

  • Iterate through queries and for each query, find the sum of elements in arr less than or equal to the query element.

  • Use binary search to efficiently find the index of the last element less than or equal to the query element.

  • Keep track of cumulative sum while iterating through arr to avoid recalculating sums.

  • Return the list of sums for each test case.

Add your answer

Q2. Minimum Character Deletion Problem Statement

You have been provided a string STR. Your task is to find and return the minimum number of characters that need to be deleted from STR so that each character's frequ...read more

Ans.

Find the minimum number of character deletions needed to make each character's frequency unique in a given string.

  • Iterate through the string and count the frequency of each character.

  • Identify characters with the same frequency and calculate the minimum deletions needed to make them unique.

  • Return the total minimum deletions for each test case.

Add your answer

Q3. Count Ways To Reach The N-th Stair Problem Statement

You are given a number of stairs, N. Starting at the 0th stair, you need to reach the Nth stair. Each time you can either climb one step or two steps. You ha...read more

Ans.

The problem involves finding the number of distinct ways to climb to the N-th stair by taking one or two steps at a time.

  • Use dynamic programming to solve this problem efficiently.

  • The number of ways to reach the N-th stair is the sum of the number of ways to reach the (N-1)th stair and the (N-2)th stair.

  • Handle large inputs by taking modulo 10^9+7 of the result.

  • Example: For N=3, there are 3 ways to climb to the third stair: (0, 1, 2, 3), (0, 2, 3), and (0, 1, 3).

Add your answer

Q4. Reverse Only Letters Problem Statement

You are given a string S. The task is to reverse the letters of the string while keeping non-alphabet characters in their original position.

Example:

Input:
S = "a-bcd"
Ou...read more
Ans.

Reverse the letters of a string while keeping non-alphabet characters in their original position.

  • Iterate through the string and store the non-alphabet characters in their original positions.

  • Reverse the letters of the string using two pointers approach.

  • Combine the reversed letters with the non-alphabet characters to get the final reversed string.

Add your answer
Discover Jnanada IT Solutions interview dos and don'ts from real experiences

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

Ans.

The task is to find the next greater element for each element in an array to its right, if no greater element exists, return -1.

  • Use a stack to keep track of elements for which the next greater element is not found yet.

  • Iterate through the array from right to left and pop elements from the stack until a greater element is found.

  • Store the next greater element for each element in a separate array.

  • If the stack is empty after iterating through the array, it means there is no greate...read more

Add your answer

Q6. Problem: Sort an Array of 0s, 1s, and 2s

Given an array/list ARR consisting of integers where each element is either 0, 1, or 2, your task is to sort this array in increasing order.

Input:

The input starts with...read more
Ans.

Sort an array of 0s, 1s, and 2s in increasing order.

  • Use a three-pointer approach to partition the array into sections of 0s, 1s, and 2s.

  • Iterate through the array and swap elements based on their values to achieve the sorting.

  • Time complexity should be O(N) where N is the number of elements in the array.

Add your answer
Are these interview questions helpful?

Q7. Left View of a Binary Tree

Given a binary tree, your task is to print the left view of the tree. The left view of a binary tree contains the nodes visible when the tree is viewed from the left side.

Input:

The ...read more
Ans.

The task is to print the left view of a binary tree, which contains the nodes visible when the tree is viewed from the left side.

  • Traverse the tree level by level and keep track of the leftmost node at each level

  • Use a queue for level order traversal and a map to store the leftmost nodes

  • Print the values of the leftmost nodes stored in the map as the left view of the tree

Add your answer

Q8. Palindrome Checker Problem Statement

Given an alphabetical string S, determine whether it is a palindrome or not. A palindrome is a string that reads the same backward as forward.

Input:

The first line of the i...read more
Ans.

Check if a given string is a palindrome or not.

  • Iterate through the string from both ends and compare characters.

  • If all characters match, return 1 indicating a palindrome.

  • If any characters don't match, return 0 indicating not a palindrome.

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

Q9. Find The Sum Of The Left Leaves Problem Statement

Given a binary tree with ‘root’, your task is to find and return the sum of all the left leaf nodes.

Example:

Input:
1 2 3 4 -1 5 6 -1 7 -1 -1 -1 -1 -1 -1
Outpu...read more
Ans.

Find and return the sum of all the left leaf nodes in a binary tree.

  • Traverse the binary tree using depth-first search (DFS)

  • Check if a node is a leaf node and a left child

  • Sum up the values of all left leaf nodes

Add your answer

Q10. Median of Two Sorted Arrays

Given two sorted arrays A and B of sizes N and M, find the median of the merged array formed by combining arrays A and B. If the total number of elements, N + M, is even, the median ...read more

Ans.

Find the median of two sorted arrays by merging them and calculating the median of the combined array.

  • Merge the two sorted arrays into one sorted array.

  • Calculate the median of the combined array based on the total number of elements.

  • Return the median as the result.

Add your answer

Q11. Find K Closest Elements

Given a sorted array 'A' of length 'N', and two integers 'K' and 'X', your task is to find 'K' integers from the array closest to 'X'. If two integers are at the same distance, prefer th...read more

Ans.

Given a sorted array, find K integers closest to X, preferring smaller ones in case of same distance.

  • Use binary search to find the closest element to X in the array.

  • Maintain two pointers to expand around the closest element to find K closest elements.

  • Compare distances and values to select the K closest elements, preferring smaller ones if distances are equal.

Add your answer

Q12. Similar String Groups Problem Statement

Two strings S1 and S2 are considered similar if either S1 equals S2 or we can swap two letters of S1 at different positions so that it equals S2.

Input:

The first line of...read more
Ans.

The problem involves determining the number of similar string groups in a given list of strings based on a specific criteria.

  • Iterate through each pair of strings in the list and check if they are similar based on the given criteria.

  • Use a hash set to keep track of visited strings to avoid counting duplicates in the same group.

  • Consider implementing a function to check if two strings are similar by allowing at most one swap of characters.

  • Count the number of distinct groups of si...read more

Add your answer
Q13. You will be given certain conditions for which you need to design a system. Can you explain your approach to low-level system design?
Ans.

Approach to low-level system design involves understanding requirements, breaking down components, defining interfaces, and optimizing performance.

  • Understand the requirements and constraints of the system

  • Break down the system into smaller components/modules

  • Define clear interfaces between components for communication

  • Optimize performance by considering data structures, algorithms, and resource utilization

Add your answer
Q14. How do you handle critical situations in a workplace?
Ans.

I remain calm, assess the situation, prioritize tasks, communicate effectively, and collaborate with team members to find a solution.

  • Remain calm and composed under pressure

  • Assess the situation to understand the root cause

  • Prioritize tasks based on urgency and impact

  • Communicate effectively with team members and stakeholders

  • Collaborate with team members to brainstorm and implement solutions

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

Interview Process at Jnanada IT Solutions

based on 1 interviews
1 Interview rounds
Coding Test Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top SDE-2 Interview Questions from Similar Companies

4.1
 • 39 Interview Questions
3.8
 • 19 Interview Questions
4.0
 • 16 Interview Questions
4.1
 • 11 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

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