Filter interviews by
Clear (1)
Questions and answers related to all mathematics topics.
Top trending discussions
I applied via LinkedIn and was interviewed before Aug 2020. There were 4 interview rounds.
I applied via Company Website and was interviewed in Jul 2020. There were 4 interview rounds.
I applied via Approached by Company and was interviewed in Sep 2024. There were 5 interview rounds.
Use two threads to print odd and even numbers in sync
Create two threads, one for printing odd numbers and one for printing even numbers
Use synchronization mechanisms like mutex or semaphore to ensure output is in sync
Example: Thread 1 prints odd numbers (1, 3, 5, ...) and Thread 2 prints even numbers (2, 4, 6, ...)
Find the largest common prefix among an array of strings.
Iterate through the characters of the first string and compare with the corresponding characters of other strings.
Stop when a mismatch is found or when reaching the end of any string.
Return the prefix found so far.
Saga pattern is a design pattern used in microservices architecture to manage distributed transactions.
Saga pattern breaks down a transaction into a series of smaller, independent steps.
Each step in the saga is a separate transaction that can be rolled back if needed.
If one step fails, compensating transactions can be executed to undo the changes made by previous steps.
Saga pattern helps maintain data consistency in a ...
Hash map and hash set are data structures that use hashing to store key-value pairs and unique values respectively.
Hash map uses key-value pairs where keys are hashed to find the corresponding value
Hash set stores unique values using hashing to quickly check for duplicates
Example: HashMap
Singleton pattern ensures a class has only one instance and provides a global point of access to it.
Singleton pattern involves a private constructor, a static method to access the instance, and a static variable to hold the instance.
To break the singleton pattern, one can use reflection to access the private constructor and create multiple instances.
Another way to break the singleton pattern is by using serialization a
I am excited about the innovative projects and collaborative team environment at this company.
Opportunity to work on cutting-edge projects
Collaborative team environment
Strong company culture and values
Room for growth and advancement
Positive reputation in the industry
I applied via Naukri.com and was interviewed before Oct 2022. There were 3 interview rounds.
Bigdata systems architecture involves distributed storage, processing, and analysis of large volumes of data.
Utilize distributed file systems like HDFS for storage
Use parallel processing frameworks like Apache Spark or Hadoop for data processing
Implement data pipelines for ETL processes
Leverage NoSQL databases like Cassandra or MongoDB for real-time data querying
Consider data partitioning and replication for fault tole
Big data system distribution for storage and compute involves partitioning data across multiple nodes for efficient processing.
Data is partitioned across multiple nodes to distribute storage and processing load.
Hadoop Distributed File System (HDFS) is commonly used for storage distribution.
Apache Spark utilizes a cluster computing framework for distributed computing.
Data locality is important to minimize data transfer ...
Design a system similar to YouTube for video sharing and streaming
Implement user authentication and authorization for uploading and viewing videos
Create a database to store video metadata, user information, and comments
Develop a recommendation algorithm based on user preferences and viewing history
Utilize a content delivery network (CDN) for efficient video streaming
Include features like video monetization, live stream
Java 8 introduced several new features including lambda expressions, streams, and default methods.
Lambda expressions allow for functional programming and concise code.
Streams provide a way to process collections of data in a parallel and functional manner.
Default methods allow for adding new functionality to interfaces without breaking existing implementations.
Method references provide a way to refer to methods without...
Customised immutable java class can be written by declaring all fields as final and not providing any setters.
Declare all fields as final
Do not provide any setters
Provide a constructor to initialize all fields
Override equals() and hashCode() methods
Make the class final
Find an odd occurring number among even occurring numbers.
Use XOR operation to cancel out even occurring numbers and get the odd occurring number.
Iterate through the array and XOR each element with the result variable.
The final result will be the odd occurring number.
Print the spiral order of a binary tree and matrix.
For binary tree, use level order traversal and alternate direction for each level.
For matrix, use four pointers to traverse in spiral order.
Example for binary tree: 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9
Example for matrix: 1 2 3 4 -> 8 7 6 5 -> 9 10 11 12 -> 16 15 14 13
Finding pairs in an array with a given sum.
Iterate through the array and for each element, check if the difference between the given sum and the element exists in the array.
Use a hash table to store the elements of the array and their indices for faster lookup.
If there are multiple pairs with the same sum, return any one of them.
If no pair is found, return null or an empty array.
Find total number of k element with given avg in an array in minimum time complexity.
Use sliding window technique to traverse the array in O(n) time complexity.
Maintain a sum variable to keep track of the sum of elements in the window.
If the sum of elements in the window is equal to k times the given avg, increment the count.
Move the window by subtracting the first element and adding the next element in the array.
Printing non-boundary elements of a binary tree
Traverse the tree in any order (preorder, inorder, postorder)
Check if the current node is not a boundary node (not the first or last node in its level)
If it is not a boundary node, print its value
Recursively traverse its left and right subtrees
based on 1 interview
Interview experience
Senior Analyst
928
salaries
| ₹0 L/yr - ₹0 L/yr |
Analyst
785
salaries
| ₹0 L/yr - ₹0 L/yr |
Operations Analyst
336
salaries
| ₹0 L/yr - ₹0 L/yr |
Process Analyst
212
salaries
| ₹0 L/yr - ₹0 L/yr |
Specialist
192
salaries
| ₹0 L/yr - ₹0 L/yr |
Wells Fargo
Citicorp
American Express
UBS