Skip to content

Expansive FM Technical Interview Task - Palindromes

Notifications You must be signed in to change notification settings

expansive-solutions/interview-palindromes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expansive Technical Task - Longest Palindrome

A palindrome is a string which reads the same backward as it does forward.

The candidate should create a solution that, when given a string input, returns the longest palindrome substring within the provided string.

For example, in the string "I drive a red racecar", "racecar" would be the longest palindrome findable. If a palindrome of at least two characters cannot be found, return NULL.

The successful candidate will:

  • Demonstrate their solution through unit tests
  • Openly discuss their approach and ask appropriate questions

Test Cases:

The candidate can demonstrate the following input/outputs through the use of unit tests

Input (palindromes underlined) Expected Output
No Palindrome NULL
php php
banana anana
papaya pap*
Lets visit the zoo isi

*if multiple of the same length, return the first found.

Usage

php composer.phar install

./vendor/bin/phpunit tests/LongestPalindromeFinderTest.php

About

Expansive FM Technical Interview Task - Palindromes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages