Skip to main content

All Questions

Tagged with
2 votes
1 answer
249 views

Implement a function to check if a linked list is a palindrome in c++

This is working example, I'm interested in mostly in knowing if there is any c++ related improvements you guys suggest? Also, do you think its better to solve this question iteratively or interviewer ...
PnotNP's user avatar
  • 219
3 votes
1 answer
119 views

Checking for a palindrome in any sub-range of a range

This is my attempt at answering "Palindrome from all the substrings" which asks to detect if a string contains a palindrome as a substring. The algorithm implemented here is the one described in its ...
PiCTo's user avatar
  • 173
3 votes
2 answers
934 views

Checking if a single linked list is a palindrome in C++

The following is my first try at this classical interview question. It is quiet different from the solutions Gayle Laakmann provides in her book, and in another question on stackoverflow, someone ...
Thomas's user avatar
  • 143
7 votes
4 answers
758 views

Largest palindrome that can be made from a product of 2 3-digit numbers (Project Euler 4)

This is my solution to Project Euler #4, which asks for the largest palindrome that can be made from a product of 2 3-digit numbers. I have done a brute force method, but it takes around 10-20 seconds ...
Teoc's user avatar
  • 337
12 votes
3 answers
805 views

Searching for pseudo-palindromes ("semordnilaps")

I was interested to know which words of the English language, when spelled backwards, are still valid words (e.g. "drawer", which when spelled backwards is "reward"), so I wrote a small program to go ...
JLagana's user avatar
  • 223
10 votes
4 answers
9k views

Project Euler #4 - Largest Palindrome Product

Problem Statement: 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 from ...
Pranit Kothari's user avatar
12 votes
4 answers
4k views

Checking for a palindrome

What I'm basically wondering is if there's anything that is possible to improve in this C++ code: ...
Rohan James's user avatar
4 votes
1 answer
3k views

Correct multithreaded reader-writer implementation

I think I'm finished writing a multithreaded reader-writer implementation for my Operating Systems course. I would like to verify that my multithreading is correct and that I'm using good C++0x style. ...
IAE's user avatar
  • 765