To the Top
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 | 355 Views, 23153 Search Bots | 57 Words

Subscribe to Feed Burner | 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 | 355 Views, 23153 Search Bots | 57 Words Subscribe to Feed Burner

Related Articles

  1. Sort a Partially Sorted List
  2. Daily Interview Problem: 3 Sum
  3. Detect Linked List Cycle
  4. Algorithm Interview: String Compression
  5. Daily Interview Question: Edit Distance
  6. Daily Interview Problem: Count Number of Unival Subtrees
  7. First and Last Indices of an Element in a Sorted Array
  8. Delphi Dynamic Array
  9. Daily Interview Problem: Minimum Removals for Valid Parenthesis
  10. Print a tree level-by-level, with line-breaks

Comments (0)

    Be the first one to comment this page !


Page Edited: May 11 2024 14:36:49 | RSS Subscription
How to Cook a Perfect Steak? | <meta name="robots" content="index, follow">