Tejas Network interview questions

124 questions from 12 interviews · updated from reports 2015-2025

Practise Tejas Network-style

About

Tejas Networks is an Indian telecom equipment company that designs and makes optical, broadband, and wireless networking products for communications service providers. In India, it commonly hires Software Engineers, R&D Engineers, and other engineering roles focused on software development and network product R&D.

The roles that come up most are Software Engineer, R&D Engineer and Engineer, R&D (Software). This covers 12 candidate interviews reported from 2015 to 2025. Most sat it at entry level (12 of 12 that recorded a level). Among the 9 that recorded either route, arrivals split between campus drives (8, 89%) and off-campus applications (1, 11%). Most questions fall under CS fundamentals and DSA.

Category
Difficulty
Round

Interview questions

Q. Differentiate between TCP and UDP.

asked 2xeasyNetworkingTechnical2023-2025

Ans. TCP is connection oriented and reliable, while UDP is connectionless and best effort. TCP guarantees ordered delivery, retransmits lost data, and uses flow and congestion control, so it has more overhead. UDP does not guarantee delivery or order, but is faster and simpler, making it useful for streaming, gaming, DNS, and voice calls.

Q. Explain the Singleton design pattern

asked 2xeasyDesign patternsManagerial, Technical2015-2019

Ans. The Singleton pattern ensures a class has exactly one instance and provides a global access point to it. It is usually implemented with a private constructor and a static method or property returning the instance. The key detail is thread safety, especially if the instance is created lazily in a multi-threaded program.

Q. Design a Chess Board class.

asked 1xmediumObject designTechnical2015

Ans. Use an 8 by 8 matrix of Piece references, with Board owning placement, lookup, move application, capture handling, turn state and history. Each Piece type should expose legal moves, while Board validates boundaries, occupancy, check and special rules such as castling, en passant and promotion. Lookup and move execution are constant time, apart from move validation.

Q. Connect N ropes with minimum cost.

asked 1xmediumGreedyOnline test2023

Ans. Use a min heap to always connect the two shortest ropes first, add their sum to the total cost, then push the combined rope back into the heap. Repeat until one rope remains. This greedy choice minimises repeated large costs. Time complexity is O(n log n), with O(n) extra space.

Q. Explain thread synchronization in Java

asked 1xmediumJavaManagerial2019

Ans. Thread synchronization in Java is the coordination of multiple threads so shared data is accessed safely and consistently. The key detail is that it provides mutual exclusion and memory visibility. Java supports this with synchronized methods or blocks, object monitors, volatile for visibility, and higher-level tools such as Lock, Atomic classes, and concurrent collections.

Q. Explain various CPU scheduling policies

asked 1xmediumOperating systemsTechnical2018

Ans. Common CPU scheduling policies include First Come First Served, Shortest Job First, Priority, Round Robin and Multilevel Queue scheduling. FCFS is simple but can cause waiting, SJF minimises average waiting time if burst times are known, Priority may starve low priority jobs, and Round Robin gives fair time slices for interactive systems.

Q. Implement a queue using only one stack.

asked 1xmediumStacks queuesTechnical2023

Ans. Use one queue by making each push place the new element at the front. Enqueue the new value, then rotate the previous elements by dequeuing and enqueuing them again. This keeps the stack top at the queue front, so pop and top are O(1), while push is O(n).

Q. Implement Quick Sort using a linked list

asked 1xmediumLinked listsTechnical2024

Ans. Implement Quick Sort on a linked list by choosing a pivot node, partitioning the list into three linked lists: less than, equal to, and greater than the pivot, then recursively sorting the less and greater lists and concatenating them. Relink nodes rather than copying values. Average time is O(n log n), worst case is O(n²).

Q. Rotate a 2D image (matrix) by 90 degrees

asked 1xmediumArraysTechnical2024

Ans. Rotate the square matrix 90 degrees clockwise by first transposing it, then reversing each row. Transposing swaps matrix[i][j] with matrix[j][i], and reversing rows moves each element into its final column position. This uses the matrix itself as the data structure, runs in O(n²) time, and uses O(1) extra space.

Q. Rotate a matrix by 90 degrees clockwise.

asked 1xmediumArraysTechnical2025

Ans. Transpose the square matrix in place, then reverse each row to rotate it 90 degrees clockwise. Transposing swaps matrix[i][j] with matrix[j][i], and reversing rows moves each element into its final clockwise position. This uses the matrix itself as the data structure, taking O(n²) time and O(1) extra space.

Q. Explain OSI layers and their applications

asked 1xmediumNetworkingTechnical2024

Ans. The OSI model has seven layers: physical, data link, network, transport, session, presentation, and application. They describe how data moves from signals on cables or wireless links to user-facing services. Examples include Ethernet at data link, IP at network, TCP or UDP at transport, and HTTP, DNS, and SMTP at application.

Q. Explain polymorphism in C++ with examples.

asked 1xmediumOOPTechnical2025

Ans. Polymorphism in C++ means the same interface can have different behaviour depending on the object or argument types. Compile-time polymorphism uses function overloading, operator overloading, or templates. Runtime polymorphism uses virtual functions, where a base class pointer or reference calls the derived class implementation, such as Shape calling Circle or Rectangle draw.

Q. What is a template class? Write an example.

asked 1xmediumOOPTechnical2023

Ans. A template class is a generic C++ class written with type parameters, so the same class definition works for different data types. For example, a Box<T> class could store one value of type T, then be used as Box<int> for integers or Box<string> for text. The compiler creates the needed typed versions.

Q. Print all boundary elements of a binary tree

asked 1xmediumTreesTechnical2019

Ans. Print the boundary as root, left boundary, all leaves, then right boundary in reverse order. Exclude leaf nodes while collecting left and right boundaries to avoid duplicates. Use simple traversal, recursion for leaves, and a stack or list for reversing the right boundary. Time complexity is O(n), space is O(h) plus output.

Q. Which protocol is used in Skype video calls?

asked 1xmediumNetworkingTechnical2018

Ans. Skype video calls use VoIP, carried mainly over UDP for real-time audio and video. UDP is preferred because low latency matters more than perfect delivery, with Skype’s own signalling, encryption and fallback mechanisms handling call setup, security and cases where UDP is blocked.

Q. Add two numbers represented as a Linked List.

asked 1xmediumLinked listsOnline test2025

Ans. Add the two linked lists digit by digit, keeping a carry, and build a new linked list for the result. Traverse both lists together, treating missing nodes as 0, store sum modulo 10 as the next result node, and carry sum divided by 10. Time is O(n), space is O(n).

Q. Rotate a matrix by 270 degrees anticlockwise.

asked 1xmediumArraysTechnical2023

Ans. Rotate the matrix 270 degrees anticlockwise by treating it as a 90 degrees clockwise rotation. For a square matrix, transpose it, then reverse every row. This works in place using the matrix itself as the data structure. The time complexity is O(n squared), and the extra space is O(1).

Q. Delete the middle node of a singly linked list

asked 1xmediumLinked listsTechnical2018

Ans. Copy the value from the next node into the given node, then change the given node’s next pointer to skip that next node. This deletes the logical node without needing the head pointer. It only works if the node is not the tail. Time is O(1) and space is O(1).

Q. Explain undefined behavior in C++ and give examples.

asked 1xmediumOOPTechnical2025

Ans. Undefined behaviour in C++ means the standard gives no rules for what happens, so the program may appear to work, crash, corrupt data, or be optimised into surprising results. Common examples are signed integer overflow, using an uninitialised variable, accessing an array out of bounds, dereferencing a null pointer, and using an object after its lifetime ends.

Q. Implement hashCode() and equals() methods in a class.

asked 1xmediumOOPTechnical2015

Ans. Override equals() to compare identity, null, class or type, then the fields that define logical equality. Override hashCode() using the same fields, combining their hashes consistently. The key rule is that if two objects are equal, they must have the same hash code. Both operations are usually O(number of compared fields).

Q. Rotate a given square matrix by 90 degrees clockwise.

asked 1xmediumArraysTechnical2024

Ans. Transpose the matrix, then reverse each row to rotate it 90 degrees clockwise. The transpose swaps matrix[i][j] with matrix[j][i] across the main diagonal, and reversing each row moves columns into their final rotated positions. This uses the existing 2D array in place, with O(n²) time and O(1) extra space.

Q. Explain the Producer-Consumer problem and its solution

asked 1xmediumOperating systemsTechnical2019

Ans. The Producer-Consumer problem is a synchronisation problem where producers add items to a shared buffer and consumers remove them without race conditions or buffer overflow/underflow. The usual solution uses a mutex for mutual exclusion and semaphores or condition variables to track empty and full slots, blocking threads when needed.

Q. Implement the Producer-Consumer problem using threads.

asked 1xmediumOperating systemsTechnical2015

Ans. Use a shared bounded queue protected by a mutex, with two condition variables or semaphores to signal “not full” and “not empty”. Producers lock, wait if the queue is full, insert an item, then signal consumers. Consumers lock, wait if empty, remove an item, then signal producers. Each operation is O(1).

Q. Explain ConcurrentHashMap and how it differs from HashMap

asked 1xmediumJavaTechnical2019

Ans. ConcurrentHashMap is a thread-safe hash table designed for concurrent reads and updates, while HashMap is not thread-safe and should not be modified by multiple threads without external synchronisation. ConcurrentHashMap reduces contention by locking or coordinating only parts of the table, allows high concurrency, and does not allow null keys or values.

Q. Explain arrays and pointers in C and how they are related

asked 1xmediumOOPTechnical2023

Ans. Arrays store a fixed number of elements of the same type, while pointers store memory addresses. In most expressions, an array name decays to a pointer to its first element, so pointer arithmetic can access array elements. However, arrays are not pointers: an array has storage and size, while a pointer is a separate variable.

Q. Explain deadlock in operating systems and its conditions.

asked 1xmediumOperating systemsTechnical2025

Ans. Deadlock is a state where two or more processes are permanently blocked because each is waiting for a resource held by another. It occurs only if four conditions hold: mutual exclusion, hold and wait, no preemption, and circular wait. Preventing or breaking any one of these conditions can avoid deadlock.

Q. Explain memory management techniques in operating systems

asked 1xmediumOperating systemsTechnical2018

Ans. Operating systems manage memory using allocation, paging, segmentation, virtual memory, swapping, and garbage collection or reclamation. The key idea is to give each process a safe, efficient address space while sharing physical RAM. Paging is most common, mapping virtual pages to physical frames and moving inactive pages to disk when needed.

Q. Make the middle node of a singly linked list the new head

asked 1xmediumLinked listsTechnical2018

Ans. Use slow and fast pointers to find the middle node, keeping a pointer to the node before slow. Make that middle node the new head by cutting prev.next, finding the old tail, and linking tail.next to the old head. This preserves all nodes in rotated order. Time is O(n), space is O(1).

Q. Print all permutations of a given string (example: "TJS")

asked 1xmediumBacktrackingOnline test2019

Ans. Use backtracking to build each permutation one character at a time and print it when its length equals the string length. Keep a boolean used array, or swap characters in place, to avoid reusing positions. For “TJS”, outputs include TJS, TSJ, JTS, JST, STJ, SJT. Time complexity is O(n × n!).

Q. How do you find the last 5 words in a file using a command?

asked 1xmediumOperating systemsTechnical2023

Ans. Use a Unix pipeline that turns words into one word per line, then takes the last five: tr -s '[:space:]' '\n' < file | tail -n 5. The important detail is normalising all whitespace first, so spaces, tabs, and newlines are treated as word separators.

Q. Recursively delete consecutive duplicate characters in a string

asked 1xmediumStringsOnline test2019

Ans. Use a recursive scan with a stack-like result: skip a whole run of equal adjacent characters, and if the next kept character now matches the previous kept character, remove that previous character too. This handles new duplicates formed after deletion. A stack is the key data structure. Time complexity is O(n), with O(n) space.

Q. What happens when two threads modify an ArrayList concurrently?

asked 1xmediumJavaTechnical2019

Ans. Two threads modifying an ArrayList concurrently can cause undefined and unsafe behaviour because ArrayList is not thread-safe. Updates may be lost, internal state may become inconsistent, and iteration may throw ConcurrentModificationException. Use external synchronisation, Collections.synchronizedList, CopyOnWriteArrayList, or another concurrent collection depending on the write frequency.

Q. Implement a Set and sort an Employee class based on ID and Name.

asked 1xmediumOOPTechnical2015

Ans. Use a Set<Employee>, define equality with equals and hashCode using the fields that make an employee unique, usually ID, then sort with a Comparator by ID and then Name. A HashSet gives average O(1) add and lookup. Sorting by copying to a list costs O(n log n).

Q. Explain the different protocols used at each layer of the OSI model

asked 1xmediumNetworkingTechnical2023

Ans. OSI layers use different protocols: Physical uses Ethernet physical standards, DSL and Wi-Fi radio; Data Link uses Ethernet, Wi-Fi and PPP; Network uses IP, ICMP and IPsec; Transport uses TCP and UDP; Session uses RPC or NetBIOS; Presentation uses TLS, JPEG or ASCII; Application uses HTTP, DNS, SMTP, FTP and SSH.

Q. Find the Lowest Common Ancestor (LCA) of two nodes in a binary tree

asked 1xmediumTreesTechnical2019

Ans. Use a recursive depth first search: if the current root is null or equals either target node, return it. Search left and right subtrees. If both return non-null, the current root is the LCA; otherwise return the non-null side. This uses the call stack, with linear time and tree-height space.

Q. Explain dynamic memory allocation in C (malloc, calloc, realloc, free)

asked 1xmediumOOPTechnical2023

Ans. Dynamic memory allocation in C means requesting and releasing heap memory at runtime. malloc allocates uninitialised memory, calloc allocates zero-initialised memory for an array, realloc resizes an existing allocation, and free releases it. The key detail is ownership: every successful allocation should eventually be freed, and allocation results must be checked for NULL.

Q. Explain the implementation and contract of equals() and hashCode() methods

asked 1xmediumJavaTechnical2019

Ans. equals() defines logical equality between objects, and hashCode() returns an integer hash used by hash-based collections. If two objects are equal by equals(), they must have the same hashCode(). Unequal objects may share a hash. Both methods should use the same immutable, significant fields and remain consistent while stored in collections.

Q. Explain interprocess communication and interthread communication mechanisms

asked 1xmediumOperating systemsTechnical2018

Ans. Interprocess communication uses OS-supported mechanisms for separate processes to exchange data, such as pipes, sockets, message queues, shared memory, signals, or files. Interthread communication usually uses shared memory within the same process, coordinated with mutexes, semaphores, condition variables, atomics, or thread-safe queues. The key issue is synchronisation to avoid races and deadlocks.

Q. Calculate the sum of all elements of all possible subarrays of a given array.

asked 1xmediumArraysTechnical2024

Ans. Compute it by summing each element’s contribution across all subarrays: element a[i] appears in (i + 1) * (n - i) subarrays, so add a[i] * (i + 1) * (n - i). This avoids generating subarrays. Use simple iteration, with O(n) time and O(1) extra space.

Q. Remove a character from a string such that the resulting string is a palindrome

asked 1xmediumStringsTechnical2019

Ans. Use two pointers from both ends and compare characters. When they differ, the only possible fix is to remove either the left character or the right character, then check whether the remaining substring is a palindrome. This needs no extra data structure, runs in O(n) time, and uses O(1) space.

Q. Add two numbers represented as linked lists and return the sum as a linked list.

asked 1xmediumLinked listsOnline test2024

Ans. Traverse both linked lists together, adding corresponding digits and a carry, and build the result using a dummy head node. For each step, store sum modulo 10 as the new digit and carry sum divided by 10. Continue until both lists and carry are exhausted. Time is O(n), space is O(n).

Q. Explain the Producer-Consumer problem and how it is handled using multithreading.

asked 1xmediumOperating systemsManagerial2015

Ans. The Producer-Consumer problem is a synchronisation problem where producer threads add items to a shared buffer and consumer threads remove them. Multithreading handles it by using locks and condition variables or semaphores to prevent race conditions, block producers when the buffer is full, and block consumers when it is empty.

Q. Find the first non-repeated character in a string with optimized time complexity.

asked 1xmediumStringsTechnical2015

Ans. Use a hash map to count each character, then scan the string again and return the first character whose count is one. This keeps the original order while avoiding repeated searches. The time complexity is O(n), and the space complexity is O(k), where k is the number of distinct characters.

Q. Generate a non-repeating sorted list from two unsorted lists containing duplicates

asked 1xmediumSortingTechnical2018

Ans. Use a set to collect all values from both unsorted lists, then sort the set to produce a non-repeating sorted list. The set removes duplicates in average constant time per insertion. If the total number of elements is n and the number of unique elements is k, the time complexity is O(n + k log k).

Q. Solve aptitude questions involving tricky quantitative and logical reasoning problems

asked 1xmediumLogical reasoningOnline test2023

Ans. Break the problem into known facts, unknowns, and constraints, then translate words into equations, tables, or cases. Check for hidden assumptions, units, and edge cases. Use elimination for logic questions and estimation to spot impossible options. After solving, substitute the answer back to verify it fits every condition.

Q. If hashCode() always returns 1 for two objects of the same class, are the objects equal?

asked 1xmediumJavaTechnical2019

Ans. No, having the same hashCode() does not mean the objects are equal. In Java, equal objects must have the same hash code, but unequal objects may also share one. If hashCode() always returns 1, hash-based collections still use equals() to check equality, but performance may become poor due to collisions.

Q. Find the maximum path sum in a matrix from the top-left corner to the bottom-right corner.

asked 1xmediumDynamic programmingOnline test2024

Ans. Use dynamic programming where each cell stores the maximum sum possible to reach it from the top-left. Set dp[0][0] to the first value, fill the first row and column from their only possible predecessor, then use dp[i][j] = matrix[i][j] + max(dp[i-1][j], dp[i][j-1]). Time is O(rows × columns).

Q. Implement a doubly linked list from scratch and print all pairs of nodes whose values sum to k.

asked 1xmediumLinked listsTechnical2023

Ans. Create a Node with value, prev and next, and a list holding head and tail for insertion. To print pairs summing to k in a sorted doubly linked list, use two pointers, one at head and one at tail. Move left forward if sum is small, right backward if large. Time is O(n), space O(1).

Q. Given an array {1,2,3,4,5}, find the number of triplets (a, b, c) such that a^2 + b^2 = c^2 in O(n^2) time.

asked 1xmediumArraysTechnical2023

Ans. The number of triplets is 1, namely (3, 4, 5). Square all values, sort them, then for each possible c use two pointers on the smaller squared values to find pairs summing to c². This checks each c in linear time, so the total time is O(n²).

Q. Design a data structure to continuously maintain the top 100 highest numbers from an infinite stream of integers.

asked 1xmediumHeapsTechnical2015

Ans. Use a min heap of size at most 100 to store the current top 100 numbers. For each new integer, insert it if the heap has fewer than 100 items; otherwise compare it with the heap minimum and replace that minimum only if the new value is larger. Each update is O(log 100), with O(100) space.

Q. Explain the significance of C keywords such as virtual, enum, structures, unions, pointers, and array vs pointer differences

asked 1xmediumOOPTechnical2018

Ans. These terms define how data and behaviour are represented in C and C-like languages. virtual is C++, not C, and enables runtime polymorphism. enum names integer constants. struct groups fields with separate storage. union shares one storage area between fields. Pointers store addresses. Arrays are fixed contiguous objects, while pointers can be reassigned.

Q. Given a sorted array, rearrange it in minimum-maximum order without using extra O(n) memory and with minimum time complexity

asked 1xmediumArraysManagerial2019

Ans. Use two pointers, one at the start and one at the end, and rewrite the array in one pass as min, max, second min, second max. To keep it in place, encode the new value with the old value using a base greater than the maximum element, then decode. Time is O(n), extra space is O(1).

Q. A rabbit starts at the top-left of a matrix and must reach the bottom-right while maximizing the total carrots collected. Find the maximum carrots that can be collected.

asked 1xmediumDynamic programmingOnline test2025

Ans. Use dynamic programming: the maximum carrots at each cell equals its carrots plus the maximum of the best totals from the cell above or the cell to the left. Initialise the first row and column as running sums. The answer is the bottom-right value. Time is O(rows × cols), space can be O(cols).

Q. Perform operations on a number based on whether it is odd or even to reduce it to 4, count odd and even numbers encountered, and return the simplified ratio of odd:even.

asked 1xmediumMathOnline test2025

Ans. Use the Collatz-style process: while n is not 4, count whether n is odd or even, then apply 3n + 1 for odd numbers and n / 2 for even numbers. Use two integer counters only. Simplify odd:even by dividing both counts by their GCD. Time complexity is O(number of steps).

Q. Explain thread concepts in operating systems

asked 1xhardOperating systemsTechnical2018

Ans. A thread is the smallest unit of CPU execution within a process. Threads in the same process share memory, files and other resources, but each has its own stack, registers and program counter. They allow concurrent work and cheaper context switching than processes, but shared data requires synchronisation to avoid races, deadlocks and inconsistent state.

Q. Copy a linked list with an arbitrary (random) pointer.

asked 1xhardLinked listsTechnical2015

Ans. Create a deep copy by interleaving each copied node immediately after its original, then assign random pointers using original.random.next, and finally split the two lists. This avoids a hash map. The time complexity is O(n), and the extra space complexity is O(1), excluding the new nodes.

Q. Find the sum of squares of all subsets of a given array.

asked 1xhardBacktrackingTechnical2025

Ans. Compute the sum of squared subset sums using the formula 2^(n-2) times ((sum of array)^2 plus sum of element squares), for n greater than zero. This avoids generating subsets. First compute the total sum and square sum in one pass, then apply the formula. Time is O(n), space is O(1).

Q. On which CPU core is a given thread running and how can you find it?

asked 1xhardOperating systemsTechnical2018

Ans. A thread runs on whichever logical CPU the OS scheduler has assigned at that instant. You can find the current CPU with OS-specific calls such as sched_getcpu() on Linux or GetCurrentProcessorNumber() on Windows, or inspect tools like top, ps, or perf. The key detail is that the answer is only a snapshot, because threads can migrate.

Q. Aptitude questions involving logical reasoning and quantitative problem solving under time constraints

asked 1xhardLogical reasoningOnline test2018

Ans. Break the problem into facts, relationships and the required answer. For quantitative questions, write the key formula or equation first, then calculate efficiently and check units or ranges. For logic questions, use tables, diagrams or elimination. Under time pressure, skip long questions, answer easier ones first, and return if time remains.

Q. Quantitative aptitude problems (no specific problem mentioned)

asked 1xunknownLogical reasoningOnline test2016

Ans. Identify the topic first, such as percentages, ratios, time and work, speed, averages, profit and loss, or probability. Write down the given values, convert units if needed, and form a simple equation. Use approximation to check options quickly. Verify the final answer against the question’s conditions before choosing it.

Showing 60 of 124 questions. Ranked by how often the same question came back across interviews.

Practise a Tejas Network-style interview

A spoken interview built from these questions, scored when you finish; the feedback is yours.

Start practising

When you are ready, record The One: a single interview hiring teams watch, so you stop repeating first rounds.

Common questions

What questions does Tejas Network ask?

Candidate interviews most often cover CS fundamentals (52%) and DSA (44%).

How many rounds does Tejas Network interview have?

Candidate interviews show an average of 3.2 rounds per experience, with a typical sequence of Online test → Technical → HR. Individual interview paths can vary.

Is the Tejas Network interview hard?

Among questions with a recorded difficulty, the mix is easy 50%, medium 44%, hard 5%.