Skip to content

logic issue- Report for is-anagram #4721

@shrihari099

Description

@shrihari099

Bug Report for https://neetcode.io/problems/is-anagram

Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.

class Solution {
public:
    bool isAnagram(string s, string t) {
       if(s.length() != s.length()) // t.length is not entering this case becoz no test case
       return false;
       sort(s.begin(),s.end());
       sort(t.begin(),t.end());
       return s==t;
    }
return false; // ->missing here
};

//please update for that test case too because iam able to submit it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions