logo
Interview
    Interview Guide
    Coding Problems List
Sponsored: Coursera
Problems

Two Strings Are Anagrams

Problem

Write a method anagram(s,t) to decide if two strings are anagrams or not.

Example

Given s="abcd", t="dcab", return true.

Challenge

O(n) time, O(1) extra space.