Find Jobs
Hire Freelancers

WordTrain

$30-5000 USD

ปิดแล้ว
โพสต์ เกือบ 22 ปีที่ผ่านมา

$30-5000 USD

ชำระเงินเมื่อส่งงาน
We have a collection of train cars. We want to hook them together to get the train with the most cars possible. Some cars have a unique front end, and some can have either end in front. Two cars can be coupled together only if their coupling mechanisms are compatible. Each car is described by a string of uppercase letters. The front end is the end with the letter that comes first in the alphabet (if it starts and ends with the same letter, either end can be in front). Two words can be hooked together only if the two adjoining ends have the same letter. Create a class WordTrain that contains the method (function) hookUp that takes cars, a string[], and returns a string which is the longest word train that can be made from cars. DEFINITION: Class: WordTrain Method Signature: string hookUp(vectorcars); If more than one train of the longest lenght is possible, return the one that comes first in the aphabet. Remember that the length of a train is the number of cars, not the number of letters. The returned string should be all the cars in the train, starting at the front of the train, concatenated with '-' showing the coupling between adjacent cars. For alphabetic breaking of ties, the '-' is included in its usual order in the ascii sequence. Your method may assume the following preconditions are met: -cars contains between 1 and 50 elements -each element of cars contains only uppercase letters -each element of cars contains between 3 and 10 inclusive letters EXAMPLES (quotes shown for clarity only) 1) {"CBA", "DAA", "CXX"} : return "ABC-CXX" This is the only possible train of length 2. Note that CBA needed to be reversed so that it was facing the right direction. 2){"ACBA"}: return "ABCA" 3){"AUTOMATA", "COMPUTER", "ROBOT"}: return "COMPUTER-ROBOT" '-' sorts before uppercase letters ## Deliverables Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. This code should be written using Microsoft Visual C++ 6.0, so that when I compile it I won't get errors or warnings related to compiler differences. I will be asking you why you did what you did, because I need to understand your logic. So either during or after you're done coding, you will need to explain me your algorithm. If you have further questions, pls email me. I need to have this program done by July 11. But I will need you to send me your pseudocode or algorithm before that. I also need a test (main) program to test the functions. Thanks :) ## Platform Windows 2000, Microsoft Visual C++ 6.0
รหัสโปรเจกต์: 2855849

เกี่ยวกับโปรเจกต์

6 ข้อเสนอ
โปรเจกต์ระยะไกล
ใช้งานอยู่ 22 ปีที่ผ่านมา

กำลังมองหาการสร้างรายได้ใช่ไหม?

ประโยชน์ของการประมูลกับ Freelancer

กำหนดงบประมาณและกรอบเวลาของคุณ
รับเงินจากการงานของคุณ
อธิบายข้อเสนอของคุณในภาพรวม
ลงทะเบียนและเสนอราคาฟรี
6 ฟรีแลนซ์กำลังเสนอราคาโดยเฉลี่ย $46 USD สำหรับงานนี้
รูปอวาตาร์ของผู้ใช้
See private message.
$38.25 USD ใน 14 วัน
4.1 (49 รีวิว)
6.3
6.3
รูปอวาตาร์ของผู้ใช้
See private message.
$85 USD ใน 14 วัน
5.0 (35 รีวิว)
5.0
5.0
รูปอวาตาร์ของผู้ใช้
See private message.
$51 USD ใน 14 วัน
5.0 (10 รีวิว)
3.5
3.5
รูปอวาตาร์ของผู้ใช้
See private message.
$42.50 USD ใน 14 วัน
4.2 (7 รีวิว)
3.5
3.5
รูปอวาตาร์ของผู้ใช้
See private message.
$42.50 USD ใน 14 วัน
5.0 (2 รีวิว)
1.7
1.7
รูปอวาตาร์ของผู้ใช้
See private message.
$17 USD ใน 14 วัน
5.0 (3 รีวิว)
0.8
0.8

เกี่ยวกับลูกค้า

ปักธงของ UNITED STATES
United States
5.0
4
เป็นสมาชิกตั้งแต่ มิ.ย. 14, 2002

การยืนยันลูกค้า

ขอบคุณ! เราได้ส่งลิงก์สำหรับเครดิตฟรีให้คุณทางอีเมลแล้ว
เกิดข้อผิดพลาดขณะส่งอีเมลของคุณ กรุณาลองอีกครั้ง
โลโก้ Freelancer Thailand / ภาษาไทย ช่วยเหลือและสนับสนุน FreelancerประเภทโปรเจคการประกวดFreelancerองค์กรแพ็กเกจสมาชิกโครงการ Freelancer ชั้นแนวหน้าการจัดการโปรเจคงานในพื้นที่Photo Anywhereหน้าจัดแสดงผลงานAPI สำหรับนักพัฒนาได้รับการยืนยันDesktop App เกี่ยวกับเกี่ยวกับเราวิธีใช้งานความปลอดภัยนักลงทุนแผนผังเว็บไซต์เรื่องราวข่าวออกสื่อทีมรางวัลข่าวประชาสัมพันธ์ร่วมงานกับเรา ข้อกำหนดนโยบายความเป็นส่วนตัวข้อกำหนดและเงื่อนไขนโยบายลิขสิทธิ์ข้อพึงปฏิบัติค่าธรรมเนียมและค่าบริการหุ้นส่วนEscrow.comLoadshiftWarrior Forum แอปโลโก้ Apple App Store โลโก้ Google Play
ไม่สามารถคัดลอกไปยังคลิปบอร์ดได้ โปรดลองอีกครั้งหลังปรับเปลี่ยนการอนุญาต
คัดลอกไปยังคลิปบอร์ดแล้ว
ผู้ใช้ที่ลงทะเบียน งานที่มีการโพสต์ทั้งหมด
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
กำลังโหลดตัวอย่าง
ได้รับอนุญาตสำหรับตำแหน่งทางภูมิศาสตร์
เซสชั่นการเข้าสู่ระบบของคุณหมดอายุและคุณได้ออกจากระบบแล้ว กรุณาเข้าสู่ระบบอีกครั้ง