General programming problems
1.Check for palindrome
public static boolean isPalindrome(String testString)
{
testString = testString.toLowerCase();
int index = 0;
int lastIndex = testString.length() - 1;
while (index < lastIndex)
{
char forwardChar = testString.charAt(index);
char reverseChar = testString.charAt(lastIndex);
while (forwardChar == ' ')
{
index++;
forwardChar = testString.charAt(index);
}
while (reverseChar == ' ')
{
index++;
reverseChar = testString.charAt(lastIndex);
}
if (forwardChar != reverseChar)
{
return false;
}
index++;
lastIndex--;
}
return true;
}2.Find all points within a certain distance of another point
3.Get the next generation of cell states
4.Break a document into chunks
5.Run length encoding and decoding
6.Add two numbers represented by their digits
7.Sudoku validator

8.Increment a number
Last updated