Find Interview Questions for Top Companies
Ques:- What is hashing? When is the time complexity of searching a hash table O(n)?
Right Answer:
Hashing is a technique used to convert data into a fixed-size value (hash code) using a hash function, which allows for efficient data retrieval. The time complexity of searching a hash table is O(n) when there are many collisions, meaning multiple keys hash to the same index, leading to a linked list or similar structure at that index, requiring linear time to search through.
Ques:- Difference between an array and a linked list
Right Answer:
An array is a collection of elements stored in contiguous memory locations, allowing for fast access by index, while a linked list is a collection of elements (nodes) where each node points to the next, allowing for dynamic size and easier insertions/deletions but slower access by index.
Ques:- What do you want to achieve ?
Asked In :-
Right Answer:
I want to achieve personal and professional growth, contribute to impactful projects, and continuously improve my skills while collaborating with a talented team.
Ques:- What is your passion ?
Right Answer:
My passion is solving complex problems through coding and building efficient software solutions.
Ques:- write a program with 2 threads. one thread should print even and other should print odd numbers in sequence. how would you make it SMP safe?
Right Answer:
```python
import threading

# Condition variable to synchronize threads
condition = threading.Condition()
even_number = 0
odd_number = 1

def print_even():
global even_number
while even_number <= 10: # Adjust the limit as needed
with condition:
print(even_number)
even_number += 2
condition.notify() # Notify the odd thread
condition.wait() # Wait for the odd thread to print

def print_odd():
global odd_number
while odd_number <= 10: # Adjust the limit as needed
with condition:
condition.notify() # Notify the even thread
condition.wait() # Wait for the even thread to print
print(odd_number)
odd_number += 2

# Create threads
even_thread = threading.Thread(target=print_even)
odd_thread = threading.Thread(target=print_odd)

# Start threads
even_thread.start()
odd_thread
Ques:- how a function from one user process can be called in other user process?
Right Answer:
A function from one user process can be called in another user process using inter-process communication (IPC) mechanisms such as sockets, shared memory, or message queues. Additionally, remote procedure calls (RPC) can be used to invoke functions across different processes.
Ques:- mention 4 IPCs used in user level process in linux
Right Answer:
1. Pipes
2. Message Queues
3. Shared Memory
4. Semaphores
Ques:- how sysctrl works?
Asked In :- Decode,
Right Answer:
`sysctl` is a command-line utility in Unix-like operating systems that allows users to view and modify kernel parameters at runtime. It interacts with the kernel's sysctl interface to read or change system settings, such as network configurations, memory management, and process limits, by accessing the `/proc/sys` filesystem.
Ques:- explain device tree concepts in linux
Right Answer:
A device tree in Linux is a data structure used to describe the hardware components of a system. It provides a way for the operating system to understand the devices present in the system without hardcoding this information into the kernel. Device trees are typically used in embedded systems and are represented in a tree-like format, where nodes represent devices and their properties. The device tree source (DTS) files are compiled into a binary format (DTB) that the Linux kernel can read during boot to configure and manage hardware.
Ques:- how function pointers are shared across different processes? using which iPCs?
Asked In :-
Right Answer:
Function pointers themselves cannot be directly shared across different processes because they point to memory addresses that are specific to each process's address space. However, you can use Inter-Process Communication (IPC) mechanisms such as shared memory, message queues, or sockets to share data or commands that can be interpreted as function calls. In shared memory, you can store function identifiers or command codes that the receiving process can use to determine which function to execute.
Ques:- what is binder in android?
Asked In :- Olive Crypto Systems,
Right Answer:
In Android, a Binder is a communication mechanism that allows different components of an application or different applications to interact with each other. It enables inter-process communication (IPC) by allowing data to be passed between processes in a secure and efficient manner.
Ques:- How would you know .. your system is little endian or big endian??
Right Answer:
You can determine if your system is little endian or big endian by checking the memory representation of a multi-byte data type (like an integer). For example, you can store a known value (like 0x1A2B3C4D) in a variable and then examine the byte order in memory. If the bytes are stored as 4D 3C 2B 1A, it is little endian. If they are stored as 1A 2B 3C 4D, it is big endian. You can also use programming languages like C or Python to perform this check programmatically.
Ques:- From my extracurricular he said that I was not focused to study only
Asked In :- paysafe group, coda global,
Right Answer:
It's important to show that you can balance extracurricular activities with your studies. You can explain how your involvement in these activities has helped you develop skills like time management, teamwork, and leadership, which are valuable in both academics and your career.
Ques:- Then he started asking about my project and other technical stuffs I did in my college life
Right Answer:
Sure! Please describe your project and the technical skills you used during your college studies.
Ques:- Then asked why my pointer are 7.8 only
Asked In :- fulcrum logic,
Right Answer:
Your pointer of 7.8 indicates your academic performance, which is typically calculated based on your grades. It reflects your overall GPA or percentage in your coursework.
Ques:- Make a function to delete nodes from Dequeue
Asked In :- Mechlin Technologies, Emma, sose,
Right Answer:
```python
class DequeNode:
def __init__(self, value):
self.value = value
self.prev = None
self.next = None

class Deque:
def __init__(self):
self.front = None
self.rear = None

def delete_node(self, node):
if not node:
return

if node == self.front:
self.front = node.next
if self.front:
self.front.prev = None
elif node == self.rear:
self.rear = node.prev
if self.rear:
self.rear.next = None
else:
node.prev.next = node.next
node.next.prev = node.prev

node.prev = None
node.next = None
```
Ques:- Get mth element of an stack which is filled up with n elements. where n>m without using another stack
Right Answer:
To get the mth element of a stack filled with n elements without using another stack, you can use recursion. Here's a simple approach:

1. Create a recursive function that pops the top element of the stack.
2. Decrement a counter each time you pop an element.
3. When the counter reaches m, store that element.
4. Continue popping elements until the stack is empty, pushing them back onto the stack.
5. Once the recursion unwinds, the mth element will be the one you stored.

Here’s a sample implementation in Python:

```python
def get_mth_element(stack, m):
if len(stack) == 0:
return None # Stack is empty
top = stack.pop()
if m == 1:
return top # Found the mth element
else:
result = get_mth_element(stack, m - 1)
stack.append(top) # Push the top element back
return result
Ques:- Uses and advantages and disadvantages Macros over functions
Right Answer:
**Uses of Macros:**
- Code simplification and reuse.
- Conditional compilation.
- Performance optimization by avoiding function call overhead.

**Advantages of Macros:**
- Faster execution since they are expanded inline.
- No function call overhead.
- Can accept variable arguments.

**Disadvantages of Macros:**
- Lack of type safety, leading to potential errors.
- Debugging can be difficult as errors may not point to the macro definition.
- Code can become harder to read and maintain due to inline expansion.
Ques:- An array A of size m+n is given whose first m elements are filled up with sorted elements. Another array B with size n filled with sorted elements. Now we have to fill all m+n elements of both array in array A in sorted order with only one traversal
Asked In :-
Right Answer:
To merge the two sorted arrays A and B into A in sorted order with one traversal, follow these steps:

1. Initialize three pointers: `i` for the last element of the sorted part of A (i.e., `m-1`), `j` for the last element of B (i.e., `n-1`), and `k` for the last position of A (i.e., `m+n-1`).

2. While `i >= 0` and `j >= 0`:
- Compare `A[i]` and `B[j]`.
- If `A[i]` is greater, set `A[k] = A[i]` and decrement `i` and `k`.
- Otherwise, set `A[k] = B[j]` and decrement `j` and `k`.

3. If there are remaining elements in B (i.e., `j >= 0`), copy them to A:


The Java skill section on takluu.com is designed for freshers, intermediate developers, and experienced professionals aiming to crack Java-based technical interviews with confidence. Java remains one of the most in-demand programming languages, and mastering it opens the door to countless opportunities in backend development, enterprise solutions, Android apps, and cloud-based platforms.

Our Java category covers everything from Core Java concepts like OOPs (Object-Oriented Programming), Data Types, Loops, and Exception Handling to Advanced Java topics including Collections Framework, Multithreading, JDBC, Servlets, JSP, Lambda Expressions, and Streams. We provide practical coding examples, real interview questions (with answers), and key concept explanations that interviewers commonly test.

Whether you’re applying for a role like Java Developer, Backend Engineer, or Full Stack Developer, this section ensures you understand the logic, syntax, and problem-solving approaches that matter in real-world interviews. You’ll also find scenario-based questions and discussions around design patterns, JVM internals, garbage collection, and performance tuning — areas often explored in senior-level interviews.

Each topic is structured to help you revise quickly and efficiently, with quizzes and mock interviews to assess your understanding. Our content is curated by experts who have worked with Java across different domains and keep the material aligned with current industry trends.

At Takluu, we believe in not just learning Java — but preparing to think in Java. Get ready to face interviews with clarity, confidence, and a deep understanding of what makes Java so powerful and reliable.

AmbitionBox Logo

What makes Takluu valuable for interview preparation?

1 Lakh+
Companies
6 Lakh+
Interview Questions
50K+
Job Profiles
20K+
Users