palindrome

package
v0.0.0-...-6fe4f4e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2024 License: MIT Imports: 1 Imported by: 0

README

Exercise 7.10 (P191)

The sort.Interface type can be adapted to other use. Write a function IsPalidrome(s sort.Interface) bool that reports whether the sequence s is a palindrome, in other words, reversig the sequence would not change it. Assume that the elements at indices i and j are equal if !s.Less(i, j) && !s.Less(j, i)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPalindrome

func IsPalindrome(s sort.Interface) bool

IsPalindrome returns slice s is a palindrome or not.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL