MapleLabs
10+ Mythri Infrastructure and Mining Interview Questions and Answers
Q1. Implementing collections using Java
Implementing collections in Java involves using built-in classes like ArrayList, HashMap, and LinkedList.
Use ArrayList for dynamic arrays
Use HashMap for key-value pairs
Use LinkedList for linked list implementation
Q2. Write a program to count vowels in your name
A program to count vowels in a given name
Create a function that takes a string as input
Loop through each character in the string and check if it is a vowel (a, e, i, o, u)
Increment a counter for each vowel found
Return the total count of vowels
Q3. Why C is faster than python
C is faster than Python due to its lower-level nature and direct hardware access.
C is a compiled language, while Python is an interpreted language.
C code is directly translated into machine code, while Python code is executed line by line.
C has direct access to hardware, while Python relies on external libraries for such access.
Q4. Difference between python and C
Python is a high-level, interpreted language known for its simplicity and readability, while C is a low-level, compiled language known for its speed and efficiency.
Python is dynamically typed, while C is statically typed.
Python has automatic memory management, while C requires manual memory management.
Python is platform-independent, while C is platform-dependent.
Python is commonly used for web development and data analysis, while C is often used for system programming and emb...read more
Q5. Implement Linked list
Implement a linked list data structure in a programming language.
Create a Node class with data and a reference to the next node
Implement methods to add, remove, and search for elements in the linked list
Handle edge cases like adding to an empty list or removing the last element
Q6. All operations on Linked list
Operations on Linked list include insertion, deletion, traversal, and searching.
Insertion: Add a new node at the beginning, end, or middle of the linked list.
Deletion: Remove a node from the linked list based on a given key or position.
Traversal: Visit each node in the linked list to perform operations or display data.
Searching: Find a specific node in the linked list based on a given key or value.
Q7. Write quick sort
Quick sort is a divide-and-conquer algorithm that sorts an array by partitioning it into smaller sub-arrays.
Choose a pivot element from the array
Partition the array into two sub-arrays based on the pivot element
Recursively apply quick sort to the sub-arrays
Combine the sorted sub-arrays to get the final sorted array
Q8. What is singleton design patterns and how to create a singleton class
Singleton design pattern ensures only one instance of a class is created and provides global access to it.
Create a private constructor to prevent direct instantiation
Create a private static instance of the class
Provide a public static method to access the instance
Ensure thread safety by using synchronized keyword or static initializer
Examples: Logger, Configuration Manager, Database Connection
Q9. Print a list without duplicate
To print a list without duplicates, use a set to remove duplicates and then convert it back to a list.
Create a set from the list to remove duplicates
Convert the set back to a list
Print the list
Q10. Find the loop in a circular linked list
To find the loop in a circular linked list, we use Floyd's cycle-finding algorithm.
Initialize two pointers, slow and fast, both pointing to the head of the linked list.
Move slow pointer by one node and fast pointer by two nodes in each iteration.
If there is a loop, both pointers will eventually meet at some node.
To find the starting point of the loop, reset the slow pointer to the head and move both pointers by one node in each iteration until they meet again.
Q11. One achivement you are proud of
I developed a software tool that automated a manual process, saving the company 50% of their time and resources.
Developed a software tool that automated a manual process
Saved the company 50% of their time and resources
Received recognition from management for the achievement
Q12. Difference between single LL and double LL
Single LL has one pointer to the next node, while double LL has two pointers - one to the next node and one to the previous node.
Single LL: Each node has a pointer to the next node only
Double LL: Each node has a pointer to the next node and the previous node
Single LL is simpler and uses less memory compared to double LL
Double LL allows for easier traversal in both directions
Q13. Implement Linkedlist insertion,deletions
Implementing Linkedlist insertion and deletion operations in a programming language.
Create a Node class with data and next pointer
Implement insertion at the beginning, end, and at a specific position
Implement deletion by value or at a specific position
Interview Process at Mythri Infrastructure and Mining
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month