Skip to content

Commit

Permalink
Merge pull request #1 from berkerol/berkerol-patch-1
Browse files Browse the repository at this point in the history
Add PerfectSquare.java
  • Loading branch information
berkerol authored Oct 27, 2018
2 parents b97f556 + 5ddae07 commit cec4132
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions PerfectSquare.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
public class PerfectSquare {

public boolean isPerfectSquare(long n) {
long l = (long) Math.sqrt(n);
return l * l == n;
}
}

0 comments on commit cec4132

Please sign in to comment.