Skip to main content

All Questions

Tagged with
4 votes
2 answers
168 views

Longest Palindromic Subsequence Multithread in C

I'm trying to learn how to multithread with c, and thought that the longest palindromic subsequence problem would be a good place to start. The idea is that we run two threads and compare their ...
AKRA's user avatar
  • 155
1 vote
3 answers
654 views

Finding n-th smallest Palindrome number (where 1<=n<=5000 and the palindrome number must have odd number of digits)

I am working on this code from 3 days from a website called Codechef, the code compiles, executes and even give correct results but my code is taking 1.01 sec, but the time limit for question is 1sec,...
Prince's user avatar
  • 125
1 vote
2 answers
260 views

Find largest palindromic substrings in a string

I have written some code to find the largest palindromic sub-strings in a string without repeating any character. Example input abappabaxhhh output ...
user786's user avatar
  • 145
3 votes
1 answer
128 views

palindrome code in C times out in program challenge?

Hello I am making a code in C to find the value of the last sequence of palindromes of a specified size (d) and I need to optimize this code as it is for an ...
Yuri Nogueira Moreira da Silva's user avatar
1 vote
4 answers
323 views

Read a palindrome of unknown length

I have a task to write the function: int read_palindrome(); // input comes from stdin which will read one line from standard input and returns 1 if the line is a ...
Prashin Jeevaganth's user avatar
2 votes
2 answers
724 views

Find a palindromic string in C

This program tests whether a string is a palindrome or not. Can there be any improvements or shortcuts that can be used in the program. You can give any type of string as input. The program finds does ...
Shaik Mohammed Zeeshan's user avatar
13 votes
10 answers
8k views

Tests for palindromes in C and C++

A question I've been asked on interactive phone screens is to code a test to determine whether a string is a palindrome or not. I am providing two examples here: one in C and one in C++. They both ...
pacmaninbw's user avatar
  • 24k
1 vote
3 answers
546 views

Checking if a string is a palindrome

This is the code for checking if a string is a palindrome. The execution time, for sample cases, is 0.40358 seconds. What must be done to increase the performance? ...
user4641842's user avatar
5 votes
2 answers
998 views

Finding palindromes and reverse strings in C

I've created a program that will find if a word is a palindrome or a reverse string (emordnilap). How it works: The palindrome part works by reversing the string,...
jakehimton's user avatar
7 votes
4 answers
17k views

Calculate the number of palindrome numbers in the given ranges

I've written a program that calculates all of the palindrome numbers in the given range, but the code is slightly slower than needed. I've tried to improve algorithmic complexity to the best of my ...
shubhendu's user avatar
  • 231
6 votes
2 answers
933 views

Longest palindrome in an array

I am new to programming, and think this code could be improved upon. Any suggestions? ...
manish ma's user avatar
  • 335
4 votes
2 answers
11k views

Reverse digits and add until a palindrome appears

The following code is a C solution to the following problem UVA 10018. The Problem The "reverse and add" method is simple: choose a number, reverse its digits and add it to the original. If ...
Justin Tanner's user avatar
8 votes
4 answers
5k views

Program to Check If string is Palindrome (in C) [closed]

Just wrote a program to check if a string is Palindrome. If that's true, return 1. Else, return 0. How can I improve it? ...
Lúcio Cardoso's user avatar
3 votes
3 answers
666 views

Integer Palindrome Check in C

This method should check whether a number is a palindrome or not: ...
LastSecondsToLive's user avatar
21 votes
10 answers
5k views

Palindromes in C

The function tests whether or not the provided string is a palindrome, and the main function just times how quick it is (after all, C's supposed to be quick, right?)...
Sam McCreery's user avatar

15 30 50 per page