Skip to content

Unneeded line in Java solution for 49. Group Anagrams #8243

@solamen2

Description

@solamen2

Your LeetCode username

ed_younskevicius

Category of the bug

  • Question
  • Solution
  • Language
  • Missing Test Cases

Description of the bug

For approach 2, Java solution, it includes this line: Arrays.fill(count, 0);

There's no need for this line, as Java always initializes int array values to 0. It can be removed for an efficiency gain (which I checked just to be sure, and the solution passes all the test cases without this line).

Code you used for Submit/Run operation

N/A

Language used for code

Java

Expected behavior

N/A

Screenshots

N/A

Additional context

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions