Find Jobs
Hire Freelancers

Palindrome

$10-30 USD

Completed
Posted about 6 years ago

$10-30 USD

Paid on delivery
This lab will give you a practice with both queue and stack ADTs. In this work, you are to determine if an input string is a palindrome. A string of characters is a palindrome if and only if it reads the same forward and backward. Examples: eye, abba, civic, radar, and so [login to view URL] are different algorithms to determine if a string is [login to view URL] work in this lab uses Stack and Queue ADTs. Here is an approach:•Read the input string one character at a time.•Push a copy of a character on to the stack. Add the same character to (the back of the) queue.•When the line has been entirely read, the program repeatedlycompares the top of element of thestack and the front element of the queue; in case of a match, it pops the stack and (simultaneously) de-queues the queue.•If ever there is a mismatch between the top element of the stack and the front element of the queue, the program declares that the input string is not a palindrome, and halts. The program also reports a position where a different text found.•If the stack (or equally correctly, the queue) gets empty, the program declares that the given string is a palindrome, and stops.
Project ID: 16556254

About the project

6 proposals
Remote project
Active 6 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
$15 USD in 1 day
5.0 (1 review)
0.4
0.4
6 freelancers are bidding on average $54 USD for this job
User Avatar
we have deal alredy.
$20 USD in 1 day
5.0 (2 reviews)
1.7
1.7
User Avatar
A proposal has not yet been provided
$13 USD in 1 day
5.0 (1 review)
0.4
0.4
User Avatar
I've been doing algorithms all through my life and this one should be straightforward. Do let me know if you need help on this one.
$25 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
sacramento, United States
4.9
7
Payment method verified
Member since Nov 16, 2017

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.