Finding if strings can be anagrams
I have String s1
and String s2
, the pair s1
, s2
is called special strings if we can make them anagram by removing a single character (any number of times) from each string s1
and s2
.
Finding is strings can be anagrams
I have String s1
and String s2
, the pair s1
, s2
is called special strings if we can make them anagram by removing a single character (any number of times) from each string s1
and s2
.
Remove unncessary parentheses in Java
I am trying to remove unncessary parentheses in an expression. So far, my code handles most of the use cases such as,
Finding minimum pairs from given input
I have a string s
of length n
made of only 3
characters 0, 1, and !
, and two numbers provided as x
and y
Count the valid segments for input array of numbers
I have an array of numbers of size n, I want to count the segments, (which are subarrays of size 3 or more) based on below condition:
minimum changes needed in array to make contiguous elements sum same
This question is asked during an online interview:
Minimum edges to form path with length L
I came across this problem.
find the max value of array grid
Working on one problem, I’ve two arrays, they are like a grid with N cols with 2 rows
Find maximum of all minimum sum
Given integer arrays A
and B
of size n
Max on the subarray of A = min on the subarray of B
Given two arrays a
and b
of length n
. I need to find amount of pairs (l, r), 1 <= l <= r <= n
such that max(a[l], ..., a[r]) = min(b[l], ..., b[r])
.