Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 12
diff options
context:
space:
mode:
Commit80a7bd9e2a3d04ab17489843ed66afaae3836b42 (patch)
Author
 Angel Dimitriev <achi_d@abv.bg>
2022-01-05 18:19:24 +0200
Committer
 GitHub <noreply@github.com>
2022-01-05 18:19:24 +0200
Files7734aee4e1c998b573917f71e56ff45829d6f476 /Sem. 12
Introduction_to_programming_FMI-80a7bd9e2a3d04ab17489843ed66afaae3836b42.tar
Introduction_to_programming_FMI-80a7bd9e2a3d04ab17489843ed66afaae3836b42.tar.gz
Introduction_to_programming_FMI-80a7bd9e2a3d04ab17489843ed66afaae3836b42.zip
Parent18c1c983a2ad2d514afe1211ca6de65132e861a6 (diff)
Create isPalindrome.cpp
1 files changed, 14 insertions, 0 deletions
-rw-r--r--Sem. 12/isPalindrome.cpp14
diff --git a/Sem. 12/isPalindrome.cpp b/Sem. 12/isPalindrome.cpp
new file mode 100644
index 0000000..3c41307
--- /dev/null
+++ b/Sem. 12/isPalindrome.cpp
@@ -0,0 +1,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()
+{
+
+}