Jobs
Interviews

Paytm

Paytm is a digital payments and financial services company that offers a comprehensive suite of financial solutions including mobile payments, wallet services, banking, and investment options.

Interview Questions for Paytm

1. Given an m x n matrix, where each row and each column is sorted in ascending order, design an efficient algorithm to search for a specific value in the matrix.

2. Given a sorted array of integers nums and an integer target, write a function to search target in nums. If the target exists, then return its index. Otherwise, return -1.

3. What are the best and worst solutions for the coding problem "Longest Substring Without Repeating Characters," including a detailed explanation of each solution along with their time and space complexity?

4. Sort 0 1 2 Problem Statement Given an integer array arr of size 'N' containing only 0s, 1s, and 2s, write an algorithm to sort the array. Input: The first line contains an integer 'T' representing the number of test cases. Each test case consists of two lines. The first line contains an integer 'N', the size of the array. The second line contains 'N' space-separated integers, the elements of the array. Output: For each test case, output the sorted array as space-separated integers in a new line. Example: Input:250 2 1 2 032 1 0Output:0 0 1 2 20 1 2 Constraints: 1 ≤ T ≤ 10 1 ≤ N ≤ 5 * 105 0 ≤ arr[i] ≤ 2 Time Limit: 1 sec Note: Try to solve the problem using a single scan over the array. You need to modify the array in-place and do not return anything.

5. What is the strategy for manpower consumption?