Add office photos
Paytm logo
Engaged Employer

Paytm

Verified
3.3
based on 7.5k Reviews
Video summary
Filter interviews by
Android Developer
Clear (1)

Paytm Android Developer Interview Questions and Answers

Updated 21 Dec 2024

Q1. BST Iterator Problem Statement

You are tasked with creating a class named BSTIterator that acts as an iterator for the inorder traversal of a binary search tree. Implement the following functions:

  1. BSTIterator(...read more
Ans.

Create a BSTIterator class for inorder traversal of a binary search tree.

  • Implement a constructor that takes the root of the binary search tree and initializes the iterator.

  • Implement next() function to return the next smallest element in the inorder traversal.

  • Implement hasNext() function to check if there is a next element in the inorder traversal.

  • Traverse the binary search tree in inorder to get the desired output.

Add your answer
right arrow

Q2. Cube Sum Pairs Problem Statement

Given a positive integer N, find the number of ways to express N as a sum of cubes of two integers, A and B, such that:

N = A^3 + B^3

Ensure you adhere to the following conditio...read more

Ans.

The problem involves finding the number of ways to express a given positive integer as a sum of cubes of two integers.

  • Iterate through all possible values of A and B within the given constraints.

  • Check if A^3 + B^3 equals the given N, increment the count if true.

  • Handle the case where A = B separately to avoid counting duplicates.

Add your answer
right arrow

Q3. Colorful Knapsack Problem

You are given a set of 'N' stones, each with a specific weight and color. The goal is to fill a knapsack with exactly 'M' stones, choosing one stone of each color, so that the total we...read more

Ans.

The Colorful Knapsack Problem involves selecting one stone of each color to fill a knapsack with a given weight capacity, minimizing unused capacity.

  • Iterate through the stones and keep track of the minimum weight for each color.

  • Use dynamic programming to find the optimal solution by considering all possible combinations.

  • Handle cases where the knapsack cannot be filled under the given conditions by returning -1.

  • In the given example, the optimal solution is to select stones wit...read more

Add your answer
right arrow

Q4. Integer to Roman Conversion

Given an integer N, convert it to its corresponding Roman numeral representation. Roman numerals comprise seven symbols: I, V, X, L, C, D, and M.

Example:

Input:
N = 2
Output:
II
Exp...read more
Ans.

Convert an integer to its corresponding Roman numeral representation.

  • Create a mapping of integer values to Roman numeral symbols.

  • Iterate through the mapping in descending order of values and build the Roman numeral representation.

  • Subtract the largest possible value from the integer at each step and append the corresponding Roman numeral symbol.

  • Repeat until the integer becomes 0.

Add your answer
right arrow
Discover Paytm interview dos and don'ts from real experiences

Q5. How to set equal spacing between childs of constraint layout?

Ans.

To set equal spacing between childs of constraint layout, use the chain style property.

  • Create a chain of the views that need equal spacing using the chain style property.

  • Set the chain style to spread inside the constraint layout.

  • Adjust the margins of the views to control the spacing.

  • Use the layout_constraintHorizontal_chainStyle or layout_constraintVertical_chainStyle attribute to set the chain style.

  • Example: app:layout_constraintHorizontal_chainStyle="spread"

View 1 answer
right arrow

Q6. What is context? Type of context in android, what are the differences

Ans.

Context in Android refers to the current state of the application. There are different types of context in Android with varying scopes and lifecycles.

  • Context is an abstract class in Android that allows access to application-specific resources and classes.

  • There are three main types of context in Android: Application Context, Activity Context, and Service Context.

  • Application Context is tied to the lifecycle of the application and is available throughout the application.

  • Activity...read more

Add your answer
right arrow

Q7. How garbage collector works?

Ans.

The garbage collector in Android automatically manages memory by reclaiming unused objects.

  • Garbage collector identifies objects that are no longer referenced by the program.

  • It frees up memory occupied by these objects, making it available for future use.

  • The process involves marking objects as reachable or unreachable, and then reclaiming memory from unreachable objects.

  • Garbage collection can be triggered automatically or manually using System.gc().

  • Example: If an object is cre...read more

View 1 answer
right arrow

Q8. Why dagger is required?

Ans.

Dagger is required for dependency injection in Android development.

  • Dagger helps in managing dependencies and reduces boilerplate code.

  • It provides compile-time safety and improves code readability.

  • Dagger also helps in testing and modularizing the codebase.

  • It is widely used in Android development for building scalable and maintainable apps.

Add your answer
right arrow

Q9. DSA: Put zeroes to end in an array

Ans.

Move all zeroes to the end of an array of strings.

  • Iterate through the array and keep track of the count of zeroes encountered.

  • Swap non-zero elements with the first zero encountered to move zeroes to the end.

Add your answer
right arrow
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos

Interview Process at Paytm Android Developer

based on 2 interviews
1 Interview rounds
Technical Round
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Android Developer Interview Questions from Similar Companies

Hike Logo
3.6
 • 25 Interview Questions
IBM Logo
4.0
 • 19 Interview Questions
TCS Logo
3.7
 • 10 Interview Questions
View all
Recently Viewed
SALARIES
KPIT Technologies
SALARIES
KPIT Technologies
SALARIES
KPIT Technologies
SALARIES
KPIT Technologies
INTERVIEWS
Sagility
No Interviews
SALARIES
KPIT Technologies
SALARIES
KPIT Technologies
SALARIES
KPIT Technologies
INTERVIEWS
Paytm
No Interviews
SALARIES
KPIT Technologies
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter