00:01
All right, so a palindrome is a word that reads the same forward as backwards.
00:06
A really common example is race car.
00:11
Right, so the first and last letter are the same, the second and second to last letter are the same, and so on.
00:19
And so this would be a seven -length palindrome.
00:27
And so we want to find an algorithm for determining whether an n -length palindrome or n -symbol or n -symbol.
00:33
Pallendrome, a word is a palindrome, right? so we'll just call this procedure a palindrome.
00:49
And it's going to take in, then some string of letters, right? so in this case, a1 would be r, a two would be a, and go all the way to an, and for us, a7 was r.
01:03
And then we would need there to be at least one letter, that means n must be greater than or equal to one.
01:13
Okay, so we initially want to just define any sort of a, any variable here, so let it be k.
01:21
I want to set it equal to true.
01:28
Okay, and this is because if there's only one, right, so if n is equal to one, whatever that is, say the word a, it's going to automatically be a palindrome, so we're going to just initialize it to true...