Aspiring Minds
Fukoku Interview Questions and Answers
Q1. Given a doubly linked list with one pointer of each node pointing to the next node just like in a singly linked list. The second pointer(arbit pointer) however can point to any node in the list and not just the...
read moreProgram to create a copy of a doubly linked list with an arbit pointer.
Traverse the original list and create a new node for each node in the list.
Store the mapping of original node to the new node in a hash table.
Traverse the original list again and set the next and arbit pointers of the new nodes.
Return the head of the new list.
Q2. Implement funcionality of 1000 of students giving a online test and timer is running. You have to calculate th etime when test is tarted and auto-matically stop the test when test is ended. Handle the scenarios...
read moreImplement functionality for online test with timer and handle power failure scenarios
Create a timer function to track the time
Store the start time and end time of the test
Implement a backup system to save progress in case of power failure
Use a database to store test data and progress
Handle edge cases like internet connectivity issues
Q3. How can you stop man in the middle attack over an insecure communication line without using any kind of encryption ?
It is not possible to stop man in the middle attack over an insecure communication line without using any kind of encryption.
Without encryption, the communication line is inherently insecure and vulnerable to man-in-the-middle attacks.
One possible solution is to use a secure communication line, such as a VPN or a dedicated private network.
Another solution is to use digital signatures to verify the authenticity of the communication.
However, these solutions are not foolproof an...read more
Q4. Heap memory and stack memory? Local variables are stored where? What is memory tables?
Heap and stack memory are two types of memory allocation in a program. Local variables are stored in stack memory. Memory tables are used to track memory allocation.
Heap memory is used for dynamic memory allocation, while stack memory is used for static memory allocation.
Local variables are stored in stack memory and are only accessible within the scope of the function they are declared in.
Memory tables are used to keep track of memory allocation and deallocation in a program...read more
Q5. What is the difference between http and https?
HTTP is unsecured while HTTPS is secured with SSL/TLS encryption.
HTTP stands for Hypertext Transfer Protocol while HTTPS stands for Hypertext Transfer Protocol Secure.
HTTP operates on port 80 while HTTPS operates on port 443.
HTTP is unencrypted while HTTPS is encrypted with SSL/TLS.
HTTPS provides authentication and data integrity while HTTP does not.
HTTPS is used for secure online transactions such as online banking, e-commerce, etc.
Q6. WAP of prime number using reursion?
A recursive function to check if a number is prime or not.
Create a function that takes a number as input.
Check if the number is less than 2, return false.
Check if the number is 2, return true.
Check if the number is divisible by any number less than it, return false.
If none of the above conditions are met, call the function recursively with the number minus 1.
Q7. Reverse a linked list?
To reverse a linked list, we need to traverse the list and change the direction of the pointers.
Create three pointers: prev, curr, and next
Initialize prev to null, curr to head of the linked list, and next to null
Traverse the list and change the direction of the pointers: next = curr.next; curr.next = prev; prev = curr; curr = next;
Set the new head of the linked list to prev
Q8. Q1. Given a doubly linked list with one pointer of each node pointing to the next node just like in a singly linked list. The second pointer(arbit pointer) however can point to any node in the list and not just...
read moreThe program creates a copy of a doubly linked list with an additional pointer pointing to any node in the list.
Traverse the original list and create a new node for each node in the original list.
Store the mapping between original and new nodes in a hash map.
Traverse the original list again and set the next and arbit pointers of the new nodes based on the mapping.
Return the head of the new list.
More about working at Aspiring Minds
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month