Skip to main content

All Questions

Filter by
Sorted by
Tagged with
3 votes
0 answers
230 views

Longest palindrome code in C# takes time out on LeetCode

I like to request a review of the code below, which is my attempt at answering the question here on LeetCode site. The code passes 43 tests, but it times out on the next one. I copied and ran the test ...
Shahin's user avatar
  • 103
18 votes
8 answers
5k views

Project Euler Problem #4 - Palindromic number

The problem is as follows: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made ...
IvenBach's user avatar
  • 3,477
8 votes
3 answers
2k views

Leetcode 125. Valid Palindrome (better performance?)

Problem statement Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example, "A man, a plan, a canal: Panama" is a ...
Jianmin Chen's user avatar
  • 2,396
4 votes
1 answer
602 views

Leetcode 125. Valid Palindrome

Problem statement Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example, "A man, a plan, a canal: Panama" is a ...
Jianmin Chen's user avatar
  • 2,396
8 votes
3 answers
1k views

Project Euler 4: Largest palindrome product

This solves Project Euler 4: Largest palindrome product using C# (specifically, using LINQPad). Any and all suggestions for improvements to either the C# code or the math/algorithm are very welcome. ...
Phrancis's user avatar
  • 20.4k
10 votes
6 answers
3k views

Determining numeric palindromes

I am working on bettering my C# skills, and recently wrote this program to solve a projecteuler.net problem: A palindromic number reads the same both ways. The largest palindrome made from the ...
Jim's user avatar
  • 235