Write a function to check if a string is an anagram of another string.
MediumProblem Statement
Write a function to check if a string is an anagram of another string.
Sample Input
Two strings: str1 = "listen", str2 = "silent"
Sample Output
True (since they are anagrams)
Limits
Time: 2s · Memory: 256 MB
Code Editor
00:00
fun longestIncreasingSubsequence(arr: Array<Int>): List<Int> {
// Add your code here to find the longest increasing subsequence
}
fun main() {
val array = arrayOf(10, 22, 9, 33, 21, 50, 41, 60)
println("Longest increasing subsequence: ${longestIncreasingSubsequence(array)}")
}
Input
Two strings: str1 = "listen", str2 = "silent"
Expected Output
True (since they are anagrams)