DEV Community

Discussion on: Data Structures & Algorithms using Rust: Find Numbers with Even Number of Digits

Collapse
 
sno2 profile image
Carter Snook

Yes, but couldn't you do i_cnt & 1 instead of i_cnt % 2 == 0?

Thread Thread
 
ssivakumar profile image
Sivakumar

Yes, that can be refactored as you suggested.