Advertisement
cwchen

[Rust] pseudocode for non-redundent-digit numbers

Aug 23rd, 2017
443
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.20 KB | None | 0 0
  1. Let N a number with j digits
  2. Let S a set
  3.  
  4. Let d(x) the digit of N at point x
  5. for i from 1 to j {
  6.     Insert d(i) into S
  7. }
  8.  
  9. Let len(x) the length of x
  10. if len(S) >= len(N) {
  11.     N fits our criteria
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement