Maximum Number by Inserting Five
Given an integer n, return the maximum number you can make by inserting 5 anywhere in the number.
Given an integer n, return the maximum number you can make by inserting 5 anywhere in the number.
You are given a list of integers seats containing 1s and 0s. Each element seats[i] represents a seat and is either occupied if seats[i] = 1 or empty if seats...
Given a list of integers nums, find the largest product of two distinct elements.
Given a list of integers nums, find the largest product of three distinct elements.
Given a two-dimensional integer matrix, return a new matrix A of the same dimensions where each element is set to A[i][j] = sum(matrix[r][c]) for all r ≤ i, ...
You are given a list of integers nums. Consider an operation where we select some subset of integers in the list and increment all of them by one.
Given a list of non-zero integers nums, return the length of longest subsequence that flips signs on each consecutive number.
Given a string s, return the length of the longest palindromic substring.
You are given a list of unique integers nums. Return the size of the largest inclusive interval [start, end] such that it contains exactly one number in nums.
Given an unsorted list of integers nums, return the longest strictly increasing subsequence of the array.
Given a non-negative integer n, return the length of the longest consecutive run of 1s in its binary representation.
Given a lowercase alphabet string s, return the length of the longest substring with same characters.