-
Description Given 2 lists, find if one is the scramble of the other. If it is, return True, else return False
Code module Scramble where scramble :: String -> String -> Bool scramble a b = "Scarmble this up"
Test Cases Failed module ScrambleSpec where import Test.Hspec import Scramble spec :: Spec spec = do it "Test Cases" $ do scramble "scramble" "scarmble" `shouldBe` True scramble "scroomble" "scroomble" `shouldBe` False scramble "ScrooMBle" "totally random thing jalkdfjlskfdjlksjdfldjs" `shouldBe` False scramble "qwertyuiop" "QWERTYUIOP" `shouldBe False
Output:
-
- All
- {{group.name}} ({{group.count}})
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}