Skip to content

Commit

Permalink
Merge pull request TheAlgorithms#489 from evandronmota/master
Browse files Browse the repository at this point in the history
Add LeetCode 367
  • Loading branch information
danghai authored Oct 29, 2019
2 parents ca5da0e + ba36b99 commit dc263b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions leetcode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ LeetCode
|283|[Move Zeroes](https://leetcode.com/problems/move-zeroes/) | [C](./src/283.c)|Easy|
|287|[Find the Duplicate Number](https://leetcode.com/problems/find-the-duplicate-number/) | [C](./src/287.c)|Medium|
|344|[Reverse String](https://leetcode.com/problems/reverse-string/) | [C](./src/344.c)|Easy|
|367|[Valid Perfect Square](https://leetcode.com/problems/valid-perfect-square/) | [C](./src/367.c)|Easy|
|387|[First Unique Character in a String](https://leetcode.com/problems/first-unique-character-in-a-string/) | [C](./src/387.c)|Easy|
|389|[Find the Difference](https://leetcode.com/problems/find-the-difference/) | [C](./src/389.c)|Easy|
|404|[Sum of Left Leaves](https://leetcode.com/problems/sum-of-left-leaves/) | [C](./src/404.c)|Easy|
Expand Down
6 changes: 6 additions & 0 deletions leetcode/src/367.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
bool isPerfectSquare(int num){
for (long i = 1; i * i <= num; i++)
if (i * i == num)
return true;
return false;
}

0 comments on commit dc263b4

Please sign in to comment.