Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 12 / isPalindrome.cpp
blob: 3c41307973b9bebf8d832af52b446c0a3d0bb77c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>

bool isPalindrome(const int* arr, unsigned size)
{
	if (size <= 1)
		return true;

	return arr[0] == arr[size - 1] && isPalindrome(arr + 1, size - 2);
}

int main()
{
   
}