Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Added Number with Even Digits Problem
  • Loading branch information
Manish committed Oct 6, 2021
commit 638de54f2752a0785b3fdfd0d8964f72fe7aaa8c
15 changes: 15 additions & 0 deletions Java/Find-Even-digits.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//https://leetcode.com/problems/find-numbers-with-even-number-of-digits/

public int findNumbers(int[] nums) {
int count = 0;
for (int i = 0; i < nums.length ; i++) {
String s = Integer.toString(nums[i]);;
int l = s.length();

if( l % 2 == 0)
count++;

}

return count;
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Check out ---> [Sample PR](https://github.com/codedecks-in/LeetCode-Solutions/pu
| 1512 | [Number of Good Pairs](https://leetcode.com/problems/number-of-good-pairs/) | [Java](./Java/Number-of-Good-Pairs.java) | O(N^2) | O(1) | Easy | Array |
| 162 | [Find Peak element](https://leetcode.com/problems/find-peak-element/) | [javascript](https://github.com/codedecks-in/LeetCode-Solutions/blob/master/JavaScript/findPeakElement.js) | o(Logn) | O(1) | Medium | Array |
| 54 | [Spiral Matrix](https://leetcode.com/problems/spiral-matrix/) | [C++](./C++/Spiral-matrix.cpp) | O(M\*N) | O(M\*N) | Medium | Array |

| 1295 | [Find Numbers with Even Number of Digits](https://leetcode.com/problems/find-numbers-with-even-number-of-digits/) | [C++](./Java/Find-Even-Digits.java) | O(N) | O(N) | Easy | Array |

<br/>

Expand Down