Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Implement a function to check if a string is an anagram of another string.

Medium

Problem Statement

Implement a function to check if a string is an anagram of another string.

Sample Input

String 1: "listen"
String 2: "silent"

Sample Output

Is anagram: true

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
// Predefined structure function isAnagram(str1: string, str2: string): boolean { // Your logic here }
Log in or sign up to run or submit your code.Log inSign up
Input
String 1: "listen"
String 2: "silent"
Expected Output
Is anagram: true