Hike
20+ Kantar Operations Interview Questions and Answers
Q1. Design an photo viewing app which will show images from the disk in the list, and one item in the list should take half of the screen. (Android app design question, have to explain all the components used in it...
read moreAn Android photo viewing app with a list of images from disk, one taking half the screen.
Use RecyclerView to display the list of images
Use a custom adapter to bind the images to the RecyclerView
Use a GridLayoutManager with span count of 2 to achieve the half-screen effect
Load images from disk using a library like Glide or Picasso
Implement click listeners to handle item selection and display the selected image
Q2. Rearrange Linked List Problem Statement
Given a singly linked list in the form 'L1' -> 'L2' -> 'L3' -> ... 'Ln', your task is to rearrange the nodes to the form 'L1' -> 'Ln' -> 'L2' -> 'Ln-1', etc. You must not...read more
Q3. LRU Cache Design Question
Design a data structure for a Least Recently Used (LRU) cache that supports the following operations:
1. get(key)
- Return the value of the key if it exists in the cache; otherwise, re...read more
Q4. Palindrome Permutation - Problem Statement
Determine if a permutation of a given string S
can form a palindrome.
Example:
Input:
string S = "aab"
Output:
"True"
Explanation:
The permutation "aba" of the string ...read more
Q5. Find Missing Number In String Problem Statement
You have a sequence of consecutive nonnegative integers. By appending all integers end-to-end, you formed a string S
without any separators. During this process, ...read more
Q6. You have to design screen in which at a time on screen 10 nearest restaurants will be shown in a list. The screen will keep adding more options while scrolling. Scroll in the list should be uninterrupted as pos...
read moreDesign a screen to show 10 nearest restaurants in a list with uninterrupted scrolling.
Use a RecyclerView to display the list of restaurants
Implement a custom adapter to populate the data in the list
Use a location service to get the user's current location
Sort the restaurants based on their distance from the user's location
Load more restaurants as the user scrolls to the end of the list
Q7. You have application which shows list of all contacts, the Name/Numbers can be duplicated. How will you go on and do searching in this. Search term can either exist in Name or in Number.
To search for contacts with duplicate names or numbers, iterate through the list and compare each contact's name and number with the search term.
Iterate through the list of contacts
Compare the search term with each contact's name and number
Return the contacts that match the search term
Q8. Java/Android : Given an Object 'Ball'. How will you transfer this ball object from one thread to another. Same ball object pass from Thread to MainThread.
To transfer the Ball object from one thread to another, we can use Handler or AsyncTask.
Use Handler to post a Runnable to the main thread's message queue
Use AsyncTask to perform background operations and update the UI on the main thread
Pass the Ball object as a parameter or use a shared variable between threads
Q9. If you were asked to make your own HashMap, how will you do it. (As it was used in the first question)
To create my own HashMap, I would use an array of linked lists to handle collisions and implement key-value pairs using a hash function.
Create an array of linked lists to store the key-value pairs
Implement a hash function to generate an index for each key
Handle collisions by adding elements to the linked list at the corresponding index
Support operations like put(key, value), get(key), and remove(key)
Q10. 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 in random order, find the first missing natural number.
Sort the array in ascending order
Iterate through the sorted array and compare each element with its index
If the element is not equal to its index + 1, return the missing number
If all elements are in order, return the next natural number after the last element
Q12. how does looper/handlers work internally when you pass object from one thread to another.
Looper/handlers allow passing objects between threads in Android.
Looper is a message loop that runs in a thread and processes messages from a message queue.
Handlers are used to send messages to the message queue of a looper.
When an object is passed from one thread to another using a handler, it is encapsulated in a message and added to the receiving thread's message queue.
The receiving thread's looper then processes the message and delivers it to the handler's callback method...read more
Q13. Design a weather app. (One image for every weather is there on a server) Take care of half downloaded image, try not to consume data of user again.
A weather app that displays images for different weather conditions, taking care of half downloaded images and minimizing data consumption.
Implement image caching to store downloaded images locally
Check if the image is already downloaded before making a network request
Use a progress bar to indicate the download status of the image
Handle cases where the download is interrupted or incomplete
Implement a mechanism to resume the download from where it left off
Optimize image loadin...read more
Q17. What are the different android components and concepts such as Recycler View, View Model, ANR and how do they function internally?
Android components like Recycler View, View Model, ANR are essential for building robust Android applications.
Recycler View: Efficient way to display large data sets by recycling views as they scroll off the screen.
View Model: Manages UI-related data in a lifecycle-conscious way, surviving configuration changes.
ANR (Application Not Responding): Dialog shown to the user when the main thread of an app is blocked for too long.
Understanding how these components work internally is...read more
Q20. Design the ImageDownloader, with efficiently handling parallel API calls.
ImageDownloader efficiently handles parallel API calls.
Use a thread pool to manage parallel API calls.
Implement caching to avoid redundant API calls.
Use a priority queue to prioritize image downloads.
Optimize network requests by using HTTP/2 or multiplexing.
Consider using a library like Picasso or Glide for image loading and caching.
Q22. How do you do DeepLinking in android.
Deep linking in Android allows users to navigate directly to specific content within an app.
Deep linking is achieved by defining intent filters in the app's manifest file.
The intent filter specifies the URL scheme and host that the app can handle.
When a deep link is clicked, Android checks if any app can handle the URL and prompts the user to choose.
The chosen app receives the deep link data in the intent's data field.
Deep linking can be used to open specific screens, perform...read more
Q23. Launch Mode of Activity.
Launch mode determines how an activity is launched and how it behaves in the task stack.
Standard: Creates a new instance of the activity on each launch.
SingleTop: Reuses the existing instance if it's already at the top of the stack.
SingleTask: Creates a new task and places the activity at the root of the task.
SingleInstance: Creates a new task and places the activity as the only one in the task.
Q24. Methods of IPC in android.
IPC (Inter-Process Communication) methods in Android allow communication between different processes.
Binder: Android's native IPC mechanism, used for communication between processes.
Intents: Used for communication between components within the same application or between different applications.
Content Providers: Allow sharing data between applications using a common interface.
Broadcasts: Used for asynchronous communication between components within an application or between d...read more
Q25. Implement an LRU cache
LRU cache is a data structure that stores the most recently used items, discarding the least recently used items when full.
Use a hashmap to store key-value pairs for quick access
Use a doubly linked list to keep track of the order of items based on their usage
When an item is accessed, move it to the front of the list
When the cache is full, remove the least recently used item from the end of the list
Interview Process at Kantar Operations
Top Android Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month