Filter interviews by
Be the first one to contribute and help others!
A C code that prints out the elements of an array of strings.
Declare an array of strings
Use a loop to iterate through the array
Print out each element
The probability of rain in Chennai today depends on various factors such as season, weather conditions, and location.
The probability can be estimated by analyzing the current weather patterns and historical data.
Factors such as humidity, temperature, and wind speed can affect the probability of rain.
Local weather forecasts and satellite imagery can also provide insights into the likelihood of rain.
The probability of ra...
It is impossible to accurately predict the probability of India winning the next Cricket World Cup.
Sports events are unpredictable and depend on various factors such as team performance, weather conditions, injuries, etc.
Past performance of the team and individual players can be considered, but it does not guarantee future success.
Other teams participating in the tournament also play a significant role in determining t...
Fragmentation is the splitting of data into smaller pieces. It can be overcome by defragmentation.
Fragmentation occurs when data is stored in non-contiguous blocks on a hard drive.
This can slow down computer performance and cause errors.
Defragmentation rearranges the data so that it is stored in contiguous blocks, improving performance.
Fragmentation can also occur in databases, where it can be overcome by rebuilding in...
Semaphore is a synchronization tool used to manage access to shared resources in a multi-threaded environment.
Semaphore maintains a count of available resources and allows threads to acquire or release them.
It can be used to limit the number of threads accessing a resource at a time.
Semaphore can be binary (0 or 1) or counting (any positive integer).
Examples of semaphore include mutex and semaphore in Unix/Linux system
IPC mechanisms in C include pipes, message queues, shared memory, and semaphores. Structure and union are data types in C.
IPC mechanisms in C are used for inter-process communication and include pipes, message queues, shared memory, and semaphores.
Pipes allow communication between two related processes.
Message queues allow communication between unrelated processes.
Shared memory allows multiple processes to access the s...
Illustrating with examples is a great way to explain complex concepts.
When teaching a new programming language, showing code examples is helpful.
In a sales pitch, using case studies as examples can demonstrate the effectiveness of a product.
In a history class, using primary sources as examples can provide a deeper understanding of events.
In a cooking class, demonstrating a recipe step-by-step is an effective way to tea...
Structure and union are two user-defined data types in C used to store multiple variables of different data types.
Structure is a collection of variables of different data types under a single name.
Union is a special data type that allows storing different data types in the same memory location.
Structures are used to represent a record while unions are used for memory optimization.
Structures use the dot operator to acce...
Code and memory storage explanation for array of strings.
Declare array variable with data type string
Allocate memory for the array
Assign values to the array elements
Access array elements using index
Memory is allocated in contiguous blocks
Explanation of data structures: Double link list, Minimum spanning tree, Reverse link list.
Double link list: Each node has two pointers, one to the previous node and one to the next node.
Minimum spanning tree: A tree that connects all nodes in a graph with minimum total weight.
Reverse link list: Traverse the list and change the pointers to point to the previous node instead of the next node.
malloc allocates memory but does not initialize it, while calloc allocates and initializes memory to zero.
malloc() takes a single argument which is the size of memory to be allocated.
calloc() takes two arguments, the number of elements to be allocated and the size of each element.
malloc() does not initialize the allocated memory, it may contain garbage values.
calloc() initializes the allocated memory to zero.
malloc() i...
Program in macro in C
Use #define to define macros
Macros are preprocessed before compilation
Example: #define MAX(a,b) ((a) > (b) ? (a) : (b))
The existing scheduling algorithm is designed to allocate resources and prioritize tasks based on their importance and urgency.
The algorithm uses a priority queue to manage tasks.
Tasks are assigned a priority level based on their importance and urgency.
The algorithm takes into account the availability of resources before assigning tasks.
The algorithm can be customized to suit specific needs and requirements.
Examples of...
E.F Codd's 12 rules for relational databases
Data must be presented in tables
Each table must have a primary key
All data must be accessible with SQL
Data must be logically separate from physical storage
Changes must not affect data access
Data integrity must be maintained
Transactions must be atomic
Concurrency must be supported
System must be independent of hardware and software
Security must be enforced
Backup and recovery mus
A bit slice processor is a type of microprocessor architecture that uses a modular approach to building CPUs.
It is designed to perform a single operation on multiple data bits simultaneously.
It is made up of multiple identical slices, each capable of performing the same operation.
It is commonly used in high-performance computing applications such as supercomputers and mainframes.
Examples include the AMD 2901 and the In
A deadlock is a situation where two or more processes are unable to continue executing because they are waiting for each other to finish.
Deadlocks occur when two or more processes are blocked and unable to proceed.
This can happen when each process is waiting for a resource that the other process has locked.
Deadlocks can be prevented by using techniques such as resource allocation graphs and deadlock detection algorithm...
Virtual memory is a memory management technique that allows a computer to use more memory than it physically has.
Virtual memory is a combination of RAM and hard disk space.
It allows programs to use more memory than is physically available.
Data is swapped between RAM and hard disk as needed.
It helps prevent programs from crashing due to lack of memory.
Examples include Windows paging file and macOS swap files.
Circuit switching is a dedicated communication path between two devices while packet switching breaks data into packets and sends them through the network.
Circuit switching establishes a dedicated connection before communication begins
Packet switching breaks data into packets and sends them through the network
Circuit switching is used in traditional telephone networks
Packet switching is used in computer networks
Circuit...
The friend keyword in C++ allows non-member functions or classes to access private and protected members of a class.
Friend functions can be declared inside a class or outside of it.
Friend classes can access all the members of the class they are friends with.
Friendship is not mutual, meaning if class A is a friend of class B, it does not mean that class B is a friend of class A.
The use of friend keyword should be limite...
Different types of inheritance include single, multiple, multilevel, hierarchical, hybrid, and multipath inheritance.
Single inheritance involves a child class inheriting from a single parent class.
Multiple inheritance involves a child class inheriting from multiple parent classes.
Multilevel inheritance involves a child class inheriting from a parent class, which in turn inherits from another parent class.
Hierarchical i...
No, I don't have any questions at the moment.
I appreciate the opportunity to interview with your company.
Thank you for taking the time to speak with me.
I look forward to hearing back from you regarding the position.
Routing protocols are used to determine the best path for data to travel, while routed protocols are used to actually transmit the data.
Routing protocols are used by routers to communicate with each other and determine the best path for data to travel.
Examples of routing protocols include OSPF, BGP, and EIGRP.
Routed protocols are used to actually transmit the data, and include protocols like TCP/IP, IPX/SPX, and AppleT...
I am a highly motivated individual with a passion for learning and achieving my goals.
I have a degree in computer science and have worked as a software developer for 3 years.
I am proficient in programming languages such as Java, Python, and C++.
I am a quick learner and enjoy taking on new challenges.
In my free time, I enjoy hiking and playing basketball with friends.
I am a team player and enjoy collaborating with other
My hobbies include reading, hiking, and playing guitar.
Reading: I enjoy reading books on history and science fiction.
Hiking: I love exploring new trails and being in nature.
Playing guitar: I have been playing for several years and enjoy learning new songs.
I preferred my area of interest because it aligns with my passion and skills.
Passion and interest in the subject matter
Skills and strengths that match the requirements of the field
Opportunities for growth and development
Potential for making a positive impact
Personal and professional fulfillment
Examples: I have always been fascinated by the human mind and behavior, and my strong analytical and communication skills make ...
I am a software engineer with experience in developing web applications and expertise in programming languages such as Java and Python.
Proficient in Java and Python programming languages
Experience in developing web applications using frameworks such as Spring and Django
Familiarity with database technologies such as MySQL and MongoDB
Strong problem-solving and analytical skills
Ability to work in a team and collaborate ef
In the next 5 years, I see myself as a senior software engineer leading a team of developers.
I plan to continue learning and expanding my skillset
I hope to take on more leadership roles and mentor junior developers
I aim to contribute to the development of innovative software solutions
I plan to stay up-to-date with the latest technologies and industry trends
Find sum of all numbers formed from root to leaf path in a binary tree
Traverse the binary tree using DFS
At each leaf node, add the number formed from root to leaf path to a sum variable
Return the sum variable
Time complexity: O(n)
Example: For a binary tree with root value 1, left child 2 and right child 3, the sum would be 12 + 13 = 25
Given a string, print all possible strings that can be made by placing spaces (zero or one) in between them.
Use recursion to generate all possible combinations of spaces
For each recursive call, either add a space or don't add a space between the current character and the next character
Base case is when there are no more characters left to add spaces between
Time complexity is O(2^n) where n is the length of the string
Preorder traversal without recursion
Use a stack to keep track of nodes
Push right child first and then left child onto stack
Pop top of stack and print value
Repeat until stack is empty
Find longest continuous patch on a 12 km road with updates in patches
Maintain a variable to keep track of current patch length
Update the variable whenever a new patch is added
Maintain a variable to keep track of longest patch so far
Compare current patch length with longest patch length and update if necessary
Use a sorted data structure like a binary search tree to store the patches for efficient search
Time complexity: ...
Find median of an unsorted array.
Sort the array and find the middle element
Use quickselect algorithm to find the median in O(n) time
If the array is small, use brute force to find the median
Find 'k' elements closest to a given number from a stream of characters.
Use a priority queue to keep track of closest elements.
Update the queue as new characters come in.
Return the 'k' closest elements from the queue.
Design a data structure with O(1) insert, remove, find-max, and delete-max operations.
Use a doubly linked list to maintain the elements in sorted order.
Use a hash table to store the pointers to the nodes in the linked list.
Maintain a pointer to the maximum element in the hash table.
Update the pointers in the hash table when inserting or removing elements.
Update the maximum pointer when deleting or inserting the maximum
Check if a given linked list is a palindrome.
Traverse the linked list and store the values in an array.
Compare the first and last elements of the array, then move towards the center.
If all elements match, the linked list is a palindrome.
Alternatively, use two pointers to find the middle of the linked list and reverse the second half.
Compare the first half with the reversed second half to check for a palindrome.
No, I am not a loner.
I enjoy working in a team and collaborating with others.
I believe that teamwork leads to better results.
I am comfortable working with people from diverse backgrounds.
I actively seek out opportunities to network and build relationships.
I am a good listener and value the opinions of others.
based on 5 reviews
Rating in categories
MEP Coordinator
3
salaries
| ₹17 L/yr - ₹17 L/yr |
TCS
Accenture
Wipro
Cognizant