
Paxcom India

20+ Paxcom India Interview Questions and Answers
Q1. Digit Count In Range Problem Statement
Given an integer K
, and two numbers A
and B
, count the occurrences of the digit K
in the range [A, B].
Include both the lower and upper limits in the count.
Input:
The fir...read more
Count occurrences of a digit in a given range.
Iterate through the range [A, B] and count occurrences of digit K.
Convert integers to strings for easier digit comparison.
Handle edge cases like when A or B is equal to K.
Optimize by considering the position of K in the range.
Q2. Maximize Expression Value
Given an arithmetic expression EXP
containing integer values separated by any of the operators ‘+’, ‘-’, and ‘*’, your task is to place parentheses such that the value of the expressio...read more
Given an arithmetic expression, place parentheses to maximize the value of the expression.
Identify the operators in the expression ('+', '-', '*').
Consider the precedence of operators to determine where to place parentheses.
Calculate the value of the expression with different placements of parentheses to find the maximum value.
Q3. Kth Largest Element Problem Statement
Ninja enjoys working with numbers, and Alice challenges him to find the Kth largest value from a given list of numbers.
Input:
The first line contains an integer 'T', repre...read more
The task is to find the Kth largest element from a given list of numbers for each test case.
Read the number of test cases 'T'
For each test case, read the number of elements 'N' and the Kth largest number to find 'K'
Sort the array in descending order and output the Kth element
Q4. Kruskal’s Minimum Spanning Tree Algorithm Problem Statement
You are given a connected undirected weighted graph. Your task is to determine the weight of the minimum spanning tree of this graph.
A minimum spanni...read more
The task is to determine the weight of the minimum spanning tree of a given connected undirected weighted graph.
Implement Kruskal's algorithm to find the minimum spanning tree weight.
Sort the edges based on their weights in non-decreasing order.
Iterate through the sorted edges and add them to the MST if they don't form a cycle.
Keep track of the total weight of the MST and return it as the output.
Q5. Find Two Missing Numbers Problem Statement
Given an array of unique integers where each element is in the range [1, N], and the size of the array is (N - 2), there are two numbers missing from this array. Your ...read more
Given an array of unique integers with two missing numbers, identify and return the missing numbers.
Iterate through the array and mark the presence of each number in a separate array.
Find the missing numbers by checking which numbers are not present in the marked array.
Return the missing numbers in increasing order.
Q6. Missing Number Problem Statement
You are provided with an array named BINARYNUMS
consisting of N
unique strings. Each string represents an integer in binary, covering every integer from 0 to N except for one. Y...read more
Find the missing integer in binary form from an array of unique binary strings.
Iterate through the binary strings and convert them to integers.
Calculate the sum of all integers from 0 to N using the formula (N*(N+1))/2.
Subtract the sum of integers in the array from the total sum to find the missing integer.
Convert the missing integer to binary form and return it as a string.
Q7. Problem Statement: Largest Island
You are provided with a non-empty grid consisting of only 0s and 1s. Your task is to determine the maximum area of an island within the given grid.
An island consists of a clus...read more
Find the maximum area of an island in a grid of 0s and 1s.
Iterate through the grid and perform depth-first search (DFS) to find connected 1s.
Keep track of the area of each island found and return the maximum area.
Consider all four directions (horizontal, vertical, and diagonal) while exploring the island.
Handle edge cases like grid boundaries and already visited cells during DFS.
If no island is present, return 0 as the maximum area.
Q8. 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
Reverse a given string containing alphabets, numbers, and special characters.
Iterate through the string from the end to the beginning and append each character to a new string.
Alternatively, you can use built-in functions like reverse() or slicing in some programming languages.
Remember to handle different types of characters like alphabets, numbers, and special characters.
Ensure to consider the constraints on the input size and number of test cases.
Q9. Number Pattern Generation
Create a program to print a numeric pattern based on the given input integer N
which specifies the number of rows.
Example:
Input:
N = 4
Output:
1
23
345
4567
Explanation:
Each row starts...read more
Generate a numeric pattern based on the given input integer N specifying the number of rows.
Iterate from 1 to N to print each row
Start each row with the row index and increase consecutively per row count
Use nested loops to handle the increasing numbers in each row
Q10. Sum Tree Conversion
Convert a given binary tree into its sum tree. In a sum tree, every node's value is replaced with the sum of its immediate children's values. Leaf nodes are set to 0. Finally, return the pre...read more
Convert a binary tree into a sum tree by replacing each node's value with the sum of its children's values. Return the preorder traversal of the sum tree.
Traverse the tree in a bottom-up manner to calculate the sum of children for each node.
Set leaf nodes to 0 and update non-leaf nodes with the sum of their children.
Return the preorder traversal of the modified tree.
Q11. Character Frequency Problem Statement
You are given a string 'S' of length 'N'. Your task is to find the frequency of each character from 'a' to 'z' in the string.
Example:
Input:
S : abcdg
Output:
1 1 1 1 0 0 ...read more
The task is to find the frequency of each character from 'a' to 'z' in a given string.
Create an array of size 26 to store the frequency of each character from 'a' to 'z'.
Iterate through the string and increment the count of the corresponding character in the array.
Print the array of frequencies as the output for each test case.
Q12. Determine the Left View of a Binary Tree
You are given a binary tree of integers. Your task is to determine the left view of the binary tree. The left view consists of nodes that are visible when the tree is vi...read more
To determine the left view of a binary tree, we need to find the nodes that are visible when the tree is viewed from the left side.
Traverse the binary tree in a level order manner and keep track of the first node at each level (leftmost node).
Store the leftmost nodes in an array as they are encountered during the traversal.
Return the array containing the left view of the binary tree.
Q13. Circular Move Problem Statement
You have a robot currently positioned at the origin (0, 0) on a two-dimensional grid, facing the north direction. You are given a sequence of moves in the form of a string of len...read more
Determine if a robot's movement path is circular on a 2D grid given a sequence of moves in the form of a string.
Create a variable to track the robot's position (x, y) and direction (north, east, south, west).
Iterate through the move sequence and update the position and direction based on the current move.
Check if the robot returns to the starting position after completing the move sequence.
Return true if the robot ends up at the starting position, false otherwise.
Q14. Difference between priority and severity Example of high priority low severity Example of low priority high severity Different apis that you have tested Difference between get, post, put
Priority is the importance of fixing a bug, severity is the impact of the bug on the system.
High priority, low severity: Spelling mistake in a button label
Low priority, high severity: Critical security vulnerability
APIs tested: RESTful, SOAP, GraphQL
GET: Retrieve data, POST: Create data, PUT: Update data
Q15. Difference between rest and soap api Calling method @Test Difference between before and before method What are annotations What is testng what does it do
REST and SOAP APIs are two different types of web service protocols. @Before and @BeforeMethod are annotations used in TestNG for setup tasks.
REST API is lightweight and uses standard HTTP methods like GET, POST, PUT, DELETE. SOAP API is more rigid and uses XML for communication.
@Before annotation is used in TestNG to run setup tasks before each test method. @BeforeMethod is used to run setup tasks before each test method in a test class.
Annotations in Java are markers that p...read more
Q16. What is an Enum? implementation of an Enum
An Enum is a data type that consists of a set of named values.
Enums are used to define a set of constants that can be used throughout the code.
Each value in an Enum is assigned an integer value by default, starting from 0.
Enums can also be assigned specific integer values or even string values.
Enums can be used in switch statements to handle different cases.
Example: enum Color { RED, GREEN, BLUE };
Example: enum Status { SUCCESS = 200, ERROR = 400 };
Q17. Find the odd occuring number from array of numbers including even occuring (frequency) numbers.
Find the odd occurring number from an array of numbers, including even occurring numbers.
Iterate through the array and count the frequency of each number using a hash map.
Iterate through the hash map and return the number with an odd frequency.
If no number has an odd frequency, return 'No odd occurring number found.'
Q18. Follow-up to Q3: Find two odd occuring numbers (Eff. Sol: Double Xor method)
The double XOR method is used to find two odd occurring numbers in an array.
Iterate through the array and perform XOR operation on all elements
The result will be the XOR of the two odd occurring numbers
Find the rightmost set bit in the result
Divide the array into two groups based on whether the corresponding bit is set or not
Perform XOR on each group separately to find the two odd occurring numbers
Q19. Most efficient way to reverse a String of characters
The most efficient way to reverse a String of characters is to use StringBuilder's reverse() method.
Create a StringBuilder object with the given String as parameter
Call the reverse() method on the StringBuilder object
Convert the StringBuilder object back to a String using toString() method
Q20. What should be considered for app performance
App performance should consider factors like code optimization, network efficiency, memory management, and user experience.
Optimizing code for efficiency and speed
Minimizing network requests and optimizing data transfer
Efficient memory management to prevent crashes and slowdowns
Prioritizing user experience for smooth navigation and responsiveness
Q21. What is considered in code review
Code review involves checking for code quality, functionality, security, and adherence to coding standards.
Checking for code quality and readability
Ensuring the code functions as intended
Identifying and fixing security vulnerabilities
Verifying adherence to coding standards and best practices
Providing constructive feedback to the developer
Q22. Java 8 Features?
Java 8 introduced several new features including lambda expressions, functional interfaces, streams, and default methods.
Lambda expressions allow you to pass functionality as an argument to a method.
Functional interfaces have a single abstract method and can be used with lambda expressions.
Streams provide a way to process collections of objects in a functional style.
Default methods allow interfaces to have method implementations.
Example: (1) Lambda expression - (a, b) -> a + ...read more
Interview Process at Paxcom India

Top Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

