Search Questions

Latest Questions | Page 11

#1

Vowel SubString

Given a string composed of lowercase letters within the ASCII range 'a'-'z', determine the number of substrings that consist solely of vowels, where each vowel appears at least once. The vowels are ['a', 'e', 'i', 'o', 'u']. A substring is defined as a contiguous sequence of characters within the string.
Example
s = 'aeioaexaaeuiou'

There is a substring to the left that is

Asked in: MEESHO


Buyer: 0
Code Size: 39
#2

Coding Wars
There are 'N' coders standing in a line, where i denotes the ith position of a coder with a rating of Ri. All ratings are distinct.
You have to form a team of 3 from amongst them with the condition:
Any three coders with positions (i, j, k) and ratings ("Ri< Rj< Rk" or "Ri > Rj > Rk") and(1 <= i < j < k <= N)
You have to find out how many such teams exist (1 coder can be part of m

Asked in: AMAZON MICROSOFT


Buyer: 1
Code Size: 54
#3

String Encoding
Encode a given string by collapsing consecutive instances of a single character into two pieces of information: the number of instances and the character. Note that even single characters should be run-length encoded. If the string is empty, return an empty string. Your implementation should work on all alphanumeric characters.
Function Description
Complete the function collapse

Asked in: AMAZON MICROSOFT


Buyer: 0
Code Size: 40
#4

Break a Palindrome
A palindrome reads the same forwards and backwards, like "mom". Modify a palindrome by changing exactly one character to another character within the ASCII range [a-z].
The goal is to ensure the new string fulfills the following criteria:
1.It is not a palindrome.
2.It is alphabetically lower than the original palindrome.
3.It is the smallest possible string alphabetically

Asked in: AMAZON MICROSOFT


Buyer: 0
Code Size: 47
#5

Vaccination Drive
In order to curb the spread of the novel COVID-19 virus, the citizens of Hackerland need to be vaccinated on priority. There are center_nodes vaccination centers in Hackerland, where each center has a status denoted by status[i]:
• Centers with a shortage of vaccines have status 1.
• Those with sufficient vaccines have status 2.
• Those with a surplus have status 3.

Vac

Asked in: AMAZON MICROSOFT JUSPAY


Buyer: 0
Code Size: 78
#6

Optimal Points Selection

Given a set of n distinct points on the x-axis, choose k of them such that the minimum distance between any two chosen points is as large as possible. Find this maximum possible minimum distance.
Example
Consider n = 5, k = 3, and x = [1, 4, 2, 9, 8].
In the optimal solution, one of the possible selections of points is [1, 4, 8]. Here,
The distance between 1 and 4 =

Asked in: AMAZON MICROSOFT


Buyer: 0
Code Size: 56
#7

Optimal Points Selection

Given a set of n distinct points on the x-axis, choose k of them such that the minimum distance between any two chosen points is as large as possible. Find this maximum possible minimum distance.
Example
Consider n = 5, k = 3, and x = [1, 4, 2, 9, 8].
In the optimal solution, one of the possible selections of points is [1, 4, 8]. Here,
The distance between 1 and 4 =

Asked in: AMAZON MICROSOFT


Buyer: 0
Code Size: 56
#8

Drone Delivery Optimization – Amazon's Challenge

In Amazon's vast distribution network, drones are essential for delivering packages. These drones have varying capacities, ranging from 1 to 10⁹. Each j-th drone has a carrying capacity of j.
Problem Statement
Amazon needs to dispatch n packages, where the weight of the i-th package is given by the array pack[i].During peak delivery times, only

Asked in: AMAZON


Buyer: 1
Code Size: 77
#9

GetMinimalCost

One of the products listed on Amazon Ecommerce is available in n sizes as indicated in the array size. The category manager recognizes that some of the sizes are repetitive and do not provide a good user experience. To make the best use of inventory, the product should be available in distinct sizes. The size of the ith product, size[i], can be increased by one unit for an amount

Asked in: AMAZON


Buyer: 0
Code Size: 64
#10

User Transaction Report for 2023
In the digital age, payment systems are essential for online transactions. For businesses managing these systems, understanding user activity is key to optimizing services and enhancing engagement.
A development team is tasked with creating a report that shows:
The total number of transactions made by each user.
The total sum of those transactions.
Analyzing t

Asked in: DOCUSIGN


Buyer: 0
Code Size: 14