i
Primebook India
Filter interviews by
I was interviewed before Mar 2024.
Android development employs various architectural patterns to enhance code organization, maintainability, and testability.
Model-View-Controller (MVC): Separates application logic, UI, and data management. Example: Basic Android apps using Activities.
Model-View-Presenter (MVP): Enhances testability by separating UI logic from business logic. Example: Using Fragments with a Presenter.
Model-View-ViewModel (MVVM): Facilita...
I applied via Recruitment Consultant and was interviewed in May 2021. There were 4 interview rounds.
An immutable class is a class whose instances cannot be modified after creation.
Make all fields private and final
Don't provide any setter methods
Ensure that any mutable objects passed to the constructor are defensively copied
Make the class final so that it cannot be subclassed
Singleton pattern ensures only one instance of a class is created and provides a global point of access to it.
Create a private constructor to prevent direct instantiation of the class.
Create a private static instance of the class.
Create a public static method to access the instance, and create the instance if it doesn't exist.
Ensure thread safety by using synchronized keyword or double-checked locking.
Vector is synchronized and ArrayList is not. Vector is thread-safe and ArrayList is not.
Vector is a legacy class and ArrayList is a part of the Java Collection Framework.
Vector is synchronized which means only one thread can access it at a time, while ArrayList is not.
Vector is thread-safe which means it can be used in a multi-threaded environment, while ArrayList is not.
Vector is slower than ArrayList because of synch...
Create Linked List without using internal library and provide add, delete, find functionality.
Create a Node class with data and next pointer
Create a LinkedList class with head pointer and methods to add, delete, and find nodes
Use a loop to traverse the list and perform operations
Handle edge cases such as adding to an empty list or deleting the head node
The current system follows a microservices architecture.
The system is divided into multiple independent services.
Each service has its own database and communicates with other services through APIs.
The architecture allows for scalability and flexibility.
Examples of microservices used in the system include user authentication, payment processing, and inventory management.
Find the total no of islands in a 2D matrix.
Use DFS or BFS to traverse the matrix.
Mark visited cells to avoid repetition.
Count the number of islands found.
Loop detection in a linked list.
Use two pointers, one moving at twice the speed of the other.
If there is a loop, the faster pointer will eventually catch up to the slower one.
If there is no loop, the faster pointer will reach the end of the list.
I applied via Walk-in and was interviewed in Jul 2019. There were 3 interview rounds.
I applied via Naukri.com and was interviewed before Jul 2021. There were 2 interview rounds.
I applied via Referral and was interviewed before Mar 2023. There was 1 interview round.
Basic coding test from hackerearth.
I applied via Recruitment Consulltant and was interviewed before Mar 2022. There were 5 interview rounds.
Mettle Test based on DP based approach
Design a distributed queue similar to Kafka.
Use a distributed architecture with multiple brokers and partitions.
Implement a publish-subscribe model for producers and consumers.
Ensure fault tolerance and high availability through replication and leader election.
Use a log-based storage system for messages and offsets.
Provide support for message ordering and retention policies.
Implement a scalable and efficient message de...
Design a Price Tagger System
Identify the products to be tagged with prices
Determine the pricing strategy (e.g. cost-plus, value-based, etc.)
Choose the appropriate tagging technology (e.g. barcode, RFID, etc.)
Develop a user-friendly interface for tagging and updating prices
Implement a database to store product and pricing information
Integrate with point-of-sale systems for accurate pricing at checkout
Designing search systems involves creating efficient algorithms and data structures to quickly retrieve relevant information.
Understand the data structure of the search system (e.g. inverted index, trie)
Implement efficient search algorithms (e.g. binary search, hash tables)
Consider scalability and performance optimization techniques (e.g. caching, indexing)
Include user-friendly features like autocomplete and spell corr...
I applied via Naukri.com and was interviewed in Jul 2021. There was 1 interview round.
Answering how to remove a character sequence with a particular number from a string.
Identify the character sequence to be removed
Use string manipulation functions to remove the sequence
Repeat until all instances of the sequence are removed
Find the second best player among n players.
Sort the players based on their scores and pick the second highest score.
If scores are not available, find the second highest rank or position.
If there are ties for first place, the second best player may be the third or fourth best player.
If there are ties for second place, there may not be a clear second best player.
I applied via Naukri.com and was interviewed in Oct 2021. There were 3 interview rounds.
Transpose of a square matrix
Iterate through each row and column of the matrix
Swap the elements at (i,j) and (j,i) positions
Return the transposed matrix
Rotate a 2D matrix 90' anticlockwise
Transpose the matrix
Reverse each row of the transposed matrix
Alternatively, swap elements in each row with their corresponding elements in the opposite row
Time complexity: O(n^2), Space complexity: O(1)
Streams in Java are a sequence of elements that can be processed in parallel or sequentially.
Streams are used to perform operations on collections of data.
They can be used to filter, map, reduce, and sort data.
Streams can be processed in parallel to improve performance.
Examples include using streams to filter a list of names or map a list of numbers to their squares.
Lambda expression is a concise way to represent anonymous functions in Java.
Lambda expressions were introduced in Java 8.
They are used to implement functional interfaces.
They reduce the amount of boilerplate code needed for anonymous classes.
Syntax: (parameters) -> expression or (parameters) -> { statements; }
Example: (x, y) -> x + y or (x, y) -> { return x + y; }
Indexing in database is a way to optimize search queries by creating a data structure that allows for faster retrieval of data.
Indexing involves creating a separate table that contains the indexed columns and their corresponding row locations.
Indexes can be created on one or multiple columns.
Indexes can be clustered or non-clustered.
Examples of indexing include primary keys, foreign keys, and unique constraints.
Indexing can lead to increased storage requirements and slower write performance.
Indexing can increase the size of the database as additional data structures are created to support the index.
Indexes can slow down write operations as the database must update both the data and the index.
Indexes can become fragmented over time, leading to decreased performance.
Indexes can also lead to increased memory usage and CPU overhe...
I applied via LinkedIn and was interviewed in Jan 2022. There were 4 interview rounds.
based on 1 interview
Interview experience
based on 1 review
Rating in categories
Flipkart
Amazon
Snapdeal
Paytm