Lexicographically Smallest Non-Palindromic String
You are given a lowercase alphabet string s that is a palindrome. Update one character such that s is no longer a palindrome and is lexicographically smallest.
You are given a lowercase alphabet string s that is a palindrome. Update one character such that s is no longer a palindrome and is lexicographically smallest.
You are given a two-dimensional list of integers ports where ports[i] represents the list of ports that port i is connected to. You are also given another tw...
Given a list of integers nums and an integer k, return whether there are four distinct elements in the list that add up to k.
Given two strings a and b, find the minimum edit distance between the two. One edit distance is defined as
Given a string s, return whether all its palindromic substrings have odd lengths.
You are given a list of integers nums. Return the maximum possible abs(nums[i] + nums[i + 1] + ... + nums[j]) for any i <= j.
Given a lowercase alphabet string s, return the minimum number of characters that we need to delete such that the frequency of each character occurs a unique...
You are given a list of integers logs and an integer limit. Each element in logs[i] represents the size of logs generated by user i. limit represents the tot...
You are given an N by M matrix of 0s and 1s. Starting from the top left corner, how many ways are there to reach the bottom right corner? Mod the result by 1...
Given a list of integers nums, we want to split the list into two non-empty sublists a and b such that every element in a is less than or equal to every elem...
You are given a list of non-negative integers nums. Return the maximum sum of a sublist in nums containing only unique values.
Given an integer n, return the next bigger permutation of its digits.