Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
4 Removed upper bound.
source | link

Input

A single 24-bit integer in your language's preferred format. This format is non-negotiable (no input as strings, arrays of digits, etc.), but standard I/O formats do apply if otherwise it would be impossible in your language.

Output

A truthy or falsely value, depending on whether the given number is palindromic (same forwards and backwards)

Rules

  • Numbers will always be positive, at least two digits long.
  • This is , so lowest O(n) time complexity wins.

Test cases

  • 123454321 - true
  • 296296 - false
  • 296692 - true
  • 5499456 - false
  • 0 - false/error/any value

Input

A single 24-bit integer. This is non-negotiable, but standard I/O formats apply.

Output

A truthy or falsely value, depending on whether the given number is palindromic (same forwards and backwards)

Rules

  • Numbers will always be positive, at least two digits long.
  • This is , so lowest O(n) time complexity wins.

Test cases

  • 123454321 - true
  • 296296 - false
  • 296692 - true
  • 5499456 - false
  • 0 - false/error/any value

Input

A single integer in your language's preferred format. This format is non-negotiable (no input as strings, arrays of digits, etc.), but standard I/O formats do apply if otherwise it would be impossible in your language.

Output

A truthy or falsely value, depending on whether the given number is palindromic (same forwards and backwards)

Rules

  • Numbers will always be positive, at least two digits long.
  • This is , so lowest O(n) time complexity wins.

Test cases

  • 123454321 - true
  • 296296 - false
  • 296692 - true
  • 5499456 - false
  • 0 - false/error/any value
    Post Closed as "unclear what you're asking" by xnor, Wheat Wizard, Mr. Xcoder, Nick Kennedy, Rɪᴋᴇʀ
3 deleted 24 characters in body
source | link

Input

A single 1624-bit integer. This is non-negotiable, but standard I/O formats apply.

Output

A truthy or falsely value, depending on whether the given number is palindromic (same forwards and backwards)

Rules

  • Numbers will always be positive, at least two digits long, and less than 99999999.
  • This is , so lowest O(n) time complexity wins.

Test cases

  • 123454321 - true
  • 296296 - false
  • 296692 - true
  • 5499456 - false
  • 0 - false/error/any value

Input

A single 16-bit integer. This is non-negotiable, but standard I/O formats apply.

Output

A truthy or falsely value, depending on whether the given number is palindromic (same forwards and backwards)

Rules

  • Numbers will always be positive, at least two digits long, and less than 99999999.
  • This is , so lowest O(n) time complexity wins.

Test cases

  • 123454321 - true
  • 296296 - false
  • 296692 - true
  • 5499456 - false
  • 0 - false/error/any value

Input

A single 24-bit integer. This is non-negotiable, but standard I/O formats apply.

Output

A truthy or falsely value, depending on whether the given number is palindromic (same forwards and backwards)

Rules

  • Numbers will always be positive, at least two digits long.
  • This is , so lowest O(n) time complexity wins.

Test cases

  • 123454321 - true
  • 296296 - false
  • 296692 - true
  • 5499456 - false
  • 0 - false/error/any value
2 edited tags
| link
1
source | link