Info Edge
Traverze Consultancy Solutions Interview Questions and Answers
Q1. Rearrange Array Elements Problem Statement
Given an array A
containing 'N' integers and an integer m
, rearrange the elements of the array such that the differences between the array elements and m
are sorted in...read more
Rearrange array elements based on their differences from a given integer.
Calculate the differences between each element and the given integer.
Sort the elements based on their differences while maintaining the original order for elements with the same difference.
Implement a function to rearrange the array elements as per the given criteria.
Q2. Print Nodes at Distance K from a Given Node
Given an arbitrary binary tree, a node of the tree, and an integer 'K', find all nodes that are at a distance K from the specified node, and return a list of these no...read more
The task is to find all nodes in a binary tree that are at a distance K from a given node.
Traverse the binary tree to find the given node
From the given node, perform a depth-first search to find all nodes at distance K
Use a list to store the values of the nodes at distance K
Return the list of values in any order
Q3. Anagram Pairs Problem Statement
Determine if two given strings are anagram pairs. Two strings are anagrams if the letters of one can be rearranged to form the other.
Input:
The input consists of a single line c...read more
Check if two strings are anagram pairs by comparing the frequency of characters.
Create character frequency maps for both strings
Compare the frequency of characters in both maps
Return True if the frequency of characters is the same for both strings, else return False
Q4. 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
Print a triangle pattern of numbers based on a given number 'N'.
Iterate through each row and print the numbers accordingly
Use spaces to center-align the numbers in each row
Increment the numbers in each row as per the pattern
OOP is a programming paradigm based on the concept of objects, which can contain data in the form of fields and code in the form of procedures.
OOP focuses on creating objects that interact with each other to solve problems.
Encapsulation: Objects can hide their internal state and require interaction through defined interfaces.
Inheritance: Objects can inherit attributes and methods from other objects.
Polymorphism: Objects can take on different forms or have multiple behaviors.
E...read more
Web server serves static content over HTTP, while application server runs dynamic content and business logic.
Web server handles HTTP requests and responses, serving static content like HTML, images, and CSS.
Application server executes business logic, runs dynamic content, and interacts with databases.
Web server examples include Apache, Nginx, while application server examples include Tomcat, JBoss.
Web server focuses on handling HTTP protocol, while application server focuses ...read more
SQL query to find the nth highest salary
Use the 'SELECT DISTINCT' statement to get unique salary values
Order the salaries in descending order using 'ORDER BY' clause
Use 'LIMIT' and 'OFFSET' to get the nth highest salary
The internet is a global network of interconnected computers that communicate using standardized protocols.
The internet is made up of a vast number of interconnected networks of computers.
Data is transmitted over the internet using protocols such as TCP/IP.
Websites are hosted on servers connected to the internet, and users access them using web browsers.
Internet Service Providers (ISPs) provide access to the internet for users through various technologies like DSL, cable, or ...read more
Q9. Insert node in binary search tree
To insert a node in a binary search tree, compare the value of the node to be inserted with the current node and traverse left or right accordingly.
Start at the root node and compare the value of the node to be inserted with the current node.
If the value is less than the current node, move to the left child node. If it is greater, move to the right child node.
Repeat this process until reaching a leaf node, then insert the new node as the left or right child of the leaf node.
Interview Process at Traverze Consultancy Solutions
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month