Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Find Numbers with Even Number of Digits leetcode

// https://leetcode.com/problems/find-numbers-with-even-number-of-digits/
// Find Numbers with Even Number of Digits

class Solution {
    public int findNumbers(int[] nums) {
        int count=0;
        for(int i =0 ; i< nums.length; i++){
            if((nums[i]>9 && nums[i]<100) || (nums[i]>999 && nums[i]<10000) || nums[i]==100000){
                count++;
            }
        }
        return count;
    }
}
Source by w3programmers.org #
 
PREVIOUS NEXT
Tagged: #Find #Numbers #Even #Number #Digits #leetcode
ADD COMMENT
Topic
Name
7+5 =