Hike
RedBus Interview Questions and Answers
Q1. You have application which shows list of all contacts, the Name can be duplicated, also it can contain duplicated numbers (0XXXXX, XXXXX etc). How will you go on and do searching in this. Search term can either...
read moreTo search for contacts with duplicate names and numbers, create a search function that checks both fields.
Create a function that takes a search term as input
Iterate through the list of contacts
Check if the search term exists in the Name field or Num field
Return the contacts that match the search term
Q2. You have to design screen in which at a time on screen 10 nearest restaurants will be shown in a list. How will you go on design this. (Need to keep UI as un interrupted as possible).
Design a screen to show 10 nearest restaurants in a list while keeping the UI uninterrupted.
Use a scrollable list view to display the restaurants
Implement a location-based search algorithm to find the nearest restaurants
Include a search bar to allow users to search for specific restaurants
Display relevant information for each restaurant such as name, rating, and distance
Implement filters or sorting options to allow users to customize the list
Consider using a map view to show ...read more
Q3. Given an array, which consist of natural numbers only. The elements are in random order, tell the first missing natural number in the array. e.g 4,6,3,1,6,8 o.p - 2 1,2,3 O/P - 4
Given an array of natural numbers, find the first missing natural number.
Sort the array and iterate through it to find the first missing number.
Use a hash set to keep track of the numbers present in the array.
The first missing number will be the smallest positive integer not present in the array.
Q4. Given an Object 'Ball'. How will you transfer this ball object from one thread to another in Android.
To transfer the Ball object from one thread to another in Android, we can use Handler or AsyncTask.
Use Handler to post the Ball object from one thread to another
Create a Handler in the receiving thread and use its post() method to receive the Ball object
Alternatively, use AsyncTask to perform the transfer in the background thread and update the UI thread with the Ball object
Q5. If you were asked to make your own HashMap, how will you do it. (As it was used in the first question)
A HashMap is a data structure that stores key-value pairs and provides constant time complexity for basic operations.
Implement a hash function to convert keys into array indices
Create an array to store the key-value pairs
Handle collisions using a technique like chaining or open addressing
Implement methods like put(), get(), and remove() to interact with the HashMap
Q6. Design a photo viewer app (Technical architecture) for android device.
A photo viewer app for Android devices.
Use RecyclerView to display a grid of photos
Implement a caching mechanism to improve performance
Support gestures for zooming and swiping between photos
Integrate with a cloud storage service for photo storage and retrieval
Implement a search feature to allow users to find specific photos
Q7. How do you do DeepLinking in android.
Deep linking in Android allows linking to specific content within an app, enabling seamless navigation.
Deep linking is achieved by defining intent filters in the app's manifest file.
The intent filter specifies the data format and scheme for the deep link.
Deep links can be triggered from other apps, websites, or even notifications.
Handling deep links involves extracting data from the intent and navigating to the appropriate screen.
Example:
Q8. Launch Mode of Activity in Android
Launch mode determines how a new instance of an activity is created and added to the task stack.
Standard: Creates a new instance of the activity each time it is launched.
SingleTop: If an instance of the activity already exists at the top of the stack, it will be reused.
SingleTask: If an instance of the activity already exists in the stack, it will be brought to the front and cleared of any activities above it.
SingleInstance: The activity will be launched in a new task and no ...read more
Q9. Methods of IPC in android.
IPC (Inter-Process Communication) methods in Android allow communication between different processes.
Binder: Android's default IPC mechanism, provides high-performance communication between processes.
AIDL (Android Interface Definition Language): Used to define the programming interface for IPC using Binder.
Intents: Used for asynchronous communication between components within an application or between different applications.
Content Providers: Allow sharing data between applic...read more
Top Software Development Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month