How to resolve the algorithm Palindrome detection step by step in the Déjà Vu programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Palindrome detection step by step in the Déjà Vu programming language

Table of Contents

Problem Statement

A palindrome is a phrase which reads the same backward and forward. Write a function or program that checks whether a given sequence of characters (or, if you prefer, bytes) is a palindrome. For extra credit:

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Palindrome detection step by step in the Déjà Vu programming language

Source code in the déjà programming language

palindrome?:
	local :seq chars
	local :len-seq -- len seq

	for i range 0 / len-seq 2:
		if /= seq! i seq! - len-seq i:
			return false
	true

!. palindrome? "ingirumimusnocteetconsumimurigni"
!. palindrome? "nope"

  

You may also check:How to resolve the algorithm Associative array/Merging step by step in the FutureBasic programming language
You may also check:How to resolve the algorithm Benford's law step by step in the ALGOL 68 programming language
You may also check:How to resolve the algorithm Bitmap/Midpoint circle algorithm step by step in the D programming language
You may also check:How to resolve the algorithm Sum of elements below main diagonal of matrix step by step in the PL/M programming language
You may also check:How to resolve the algorithm Minimum positive multiple in base 10 using only 0 and 1 step by step in the Wren programming language