Athenahealth Technology
20+ Tata Communications Interview Questions and Answers
Q1. Maximum Subarray Sum Problem Statement
Given an array arr
of length N
consisting of integers, find the sum of the subarray (including empty subarray) with the maximum sum among all subarrays.
Explanation:
A sub...read more
Q2. Rectangular Numbers Problem Statement
Ninja has a number 'N'. Your task is to generate a pattern where the outer rectangle is filled with the number 'N', and as you move inward, the numbers decrease consecutive...read more
Q3. First Missing Positive Problem Statement
You are provided with an integer array ARR
of length 'N'. Your objective is to determine the first missing positive integer using linear time and constant space. This me...read more
Q4. Flipping Coins Problem
Gary has N coins placed in a straight line. Some coins have their head side up, and others have the tail side up.
Convention:
1 denotes the HEAD side is up.
0 denotes the TAIL side is up....read more
Q5. Problem: kth Missing Element in a Sequence
Given a strictly increasing sequence of integers VEC
, identify the Kth
missing contiguous integer element that is not present in the sequence, starting from the leftmo...read more
Q6. K Largest Elements Problem Statement
Given an unsorted array containing 'N' integers, you are required to find 'K' largest elements from the array and return them in non-decreasing order.
Input:
The first line ...read more
Q7. Sudoku Solver Problem Statement
Given a 9 x 9 2D matrix 'MATRIX', where some cells are filled with digits (1-9) and others are empty (denoted by 0), determine if there is a way to fill the empty cells such that...read more
Q8. Binary Array Sorting Problem Statement
You are provided with a binary array, i.e., an array containing only 0s and 1s. Your task is to sort this binary array and return it after sorting.
Input:
The first line ...read more
Q9. Cycle Detection in a Singly Linked List
Determine if a given singly linked list of integers forms a cycle or not.
A cycle in a linked list occurs when a node's next
points back to a previous node in the list. T...read more
Q10. Search in a Row-wise and Column-wise Sorted Matrix Problem Statement
You are given an N * N matrix of integers where each row and each column is sorted in increasing order. Your task is to find the position of ...read more
Q11. Reverse the String Problem Statement
You are given a string STR
which contains alphabets, numbers, and special characters. Your task is to reverse the string.
Example:
Input:
STR = "abcde"
Output:
"edcba"
Input...read more
Q12. Word Distance Calculation
Given a document represented as an array/list ARR
of words with length N
, find the smallest distance between two given words for multiple queries. The distance is defined as the differ...read more
Q13. N Queens Problem
Given an integer N
, find all possible placements of N
queens on an N x N
chessboard such that no two queens threaten each other.
Explanation:
A queen can attack another queen if they are in the...read more
Q14. 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
Q15. Form a Triangle Problem Statement
You are provided with an integer array/list ARR
of length N. Your task is to determine if it is possible to construct at least one non-degenerate triangle using the values of t...read more
Q16. Convert Binary Tree to Mirror Tree
Convert a given binary tree into its mirror tree, where the left and right children of all non-leaf nodes are interchanged.
Input:
An integer ‘T’ denoting the number of test c...read more
Q17. Heap Sort Problem Statement
Given an array ARR
consisting of N
integers, your task is to use the Heap sort algorithm to arrange the array in non-decreasing order.
Input:
The first line of the input contains an ...read more
Q18. Level Order Traversal Problem Statement
Given a binary tree of integers, return the level order traversal of the binary tree.
Input:
The first line contains an integer 'T', representing the number of test cases...read more
Q19. Remove Character from String Problem Statement
Given a string str
and a character 'X', develop a function to eliminate all instances of 'X' from str
and return the resulting string.
Input:
The first line contai...read more
Q20. Triangle of Numbers Pattern
Ninja is tasked with printing a triangle pattern based on a given number 'N' for any test case.
Example:
Input:
N = 4
Output:
1
232
34545
4567654
Explanation:
The pattern comprises n...read more
Interview Process at Tata Communications
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month