File: root - text - article - 2020 - 02 - palindrome-integers.txt
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 606 Views, 26066 Search Bots | 57 Words
| Browse | Archive
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 606 Views, 26066 Search Bots | 57 Words
| Browse | Archive
Hi, here's your problem today. This problem was recently asked by Twitter:
Given an integer, check if that integer is a palindrome. For this problem do not convert the integer to a string to check if it is a palindrome.
import math
def is_palindrome(n):
# Fill this in.
print is_palindrome(1234321)
# True
print is_palindrome(1234322)
# False
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Cateogry: Computing | 606 Views, 26066 Search Bots | 57 Words Given an integer, check if that integer is a palindrome. For this problem do not convert the integer to a string to check if it is a palindrome.
import math
def is_palindrome(n):
# Fill this in.
print is_palindrome(1234321)
# True
print is_palindrome(1234322)
# False
Related Articles
- Reverse a Linked List
- Daily Interview Puzzle: Minimum Size Subarray Sum
- Daily Interview Problem: Sort Colors
- Daily Interview Problem: Largest Product of 3 Elements I
- Absolute Path
- [Daily Problem] Angles of a Clock
- ImageMagick Vulnerabilities - CVE-2016–3714
- Algorithm Interview: Maximum Path Sum in Binary Tree
- New Vulnerabilities (CVE-2016-4581) have been detected in CentOS/RHEL/CloudLinux 7
- First and Last Indices of an Element in a Sorted Array
©2006~2024 SteakOverCooked - 0.00992 Seconds(s) - 1981.862 KB/s - 39 Online Memory: 492.77 KB
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - Server PHP Version: 7.4.33
How to Cook a Perfect Steak? | <meta name="robots" content="index, follow">
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - Server PHP Version: 7.4.33
Comments (0)
Read & Write - Normal - Mini - Post - All Comments - Statistics
Be the first one to comment this page !