Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #36: Anagram check #38

Merged
merged 2 commits into from
Nov 8, 2019
Merged

Fix issue #36: Anagram check #38

merged 2 commits into from
Nov 8, 2019

Conversation

PalAditya
Copy link
Contributor

Fixes #36
Note: Apparently var in arrays is not allowed, so I used int declaration there, although I couldn't find these behavior in the docs 🤔

@PalAditya
Copy link
Contributor Author

@iluwatar please review this.

README.md Outdated
var l1 = s1.length();
var l2 = s2.length();
int [] arr1 = new int[256];
int [] arr2 = new int[256];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var arr1 = new int[256];

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ jshell
| Welcome to JShell -- Version 11.0.4
| For an introduction type: /help intro

jshell> var arr1 = new int[256];
arr1 ==> int[256] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... , 0, 0, 0, 0, 0, 0, 0, 0 }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the information. Fixed 😄

@iluwatar iluwatar merged commit 932a50a into iluwatar:master Nov 8, 2019
@iluwatar iluwatar added this to the Java Snippets 1.0 milestone Nov 8, 2019
@iluwatar
Copy link
Owner

iluwatar commented Nov 8, 2019

Excellent @PalAditya, thank you very much for this snippet ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Anagram check
2 participants