Find Jobs
Hire Freelancers

Summation puzzle -- 2

$10-30 USD

În desfășurare
Data postării: peste 3 ani în urmă

$10-30 USD

Plata la predare
In a summation puzzle, you are given three strings of the form POT + PAN = BIB. Typically each is a word, often with a theme to the three chosen. Your goal is to assign a ​distinct​ digit to each letter in the equation in order to make the resulting true. For example, if the puzzle is POT + PAN = BIB, the mapping P:2, O:3, T:1, A:7, N:4, B:5, I:0 will solve this, as 231 + 274 = 505. You are required to implement the function puzzleSolver in proj1.cpp. This function should return true if, and only if, the puzzle is solvable: that is, if there is a mapping of the letters that appear in the three strings to ​distinct​ digits such that the sum of the first two is the third. No string will have a value larger than 4,294,967,295 in its correct substitution, nor will the addition have any integer-overflow to check for. If you do not know what integer overflow is, you do not need to check during this assignment (although it’s worth knowing in general). For this project, you have a few requirements: ● You must implement the function puzzleSolver in [login to view URL]​. ​You may assume it is called with three valid non-empty strings as parameters and with an otherwise empty map. The strings will always consist only of all-capital letters. ● Your solution must explicitly use recursion in a meaningful way towards solving the problem. You may ​not ​solve this by using a function like std::next_permutation (from <algorithm>) to enumerate possibilities. ○ The function ​puzzleSolver ​itself need not be recursive if you would prefer to have a helper function that is. ● The function must return a boolean indicating whether or not the puzzle ​has​ a solution. ○ If the puzzle ​does not​ have a solution, your function should return false. ○ If the puzzle ​does​ have a solution your function should return true ​and​ have the map<char, unsigned> parameter containing the mapping needing to verify. That is, the four parameters to the ​puzzleSolver ​function need to be such that a correct solution to project 0 would return true with those parameters. ○ If there are multiple solutions, returning any of them is fine. You can think of my grading code as this: ■ I know if the test case has or hasn't a solution. I check that you return the right bool value. ■ If it has a solution, I also run a (correct) solution to proj0 on the three strings + the map's status at the end of your function. ○ If the previous point means you need to modify the given gtest code, feel free to do so -- my real grading code will run a verifier instead of checking for an explicitly expected mapping. ● Your program must run in under three minutes on a reasonably modern computer. Test cases that take longer than this to run may be deemed to be incorrect. Note that this means you will need to think a little about efficiency in your program. You ​may​ use standard libraries as appropriate, unless there is one that makes solving this problem trivial. I am unaware of any such part of the library. You are ​explicitly permitted​ to use std::set, std::list, std::queue, and std::stack if you so choose. You are pretty much required to use std::map.
ID-ul proiectului: 27825129

Despre proiect

4 propuneri
Proiect la distanță
Activ: 3 ani în urmă

Vrei să câștigi bani?

Avantajele de a licita pe platforma Freelancer

Stabilește bugetul și intervalul temporal
Îți primești plata pentru serviciile prestate
Evidențiază-ți propunerea
Te înregistrezi și licitezi gratuit pentru proiecte
4 freelanceri plasează o ofertă medie de $29 USD pentru proiect
Avatarul utilizatorului
Hello I can help you with this project. Bid details: · I´ll send you a full tested and documented program (in code). · Unlimited cycles of revision in the agreed time period. · Full advice about the best way to do the implementation. Please contact me to discuss the details. Thanks
$30 USD în 2 zile
4,9 (24 recenzii)
5,2
5,2
Avatarul utilizatorului
Hello I am highly experienced in Java/Python/VB.NET/C/C++/C# and related Technologies, OOP, Data Structures, functional and procedural programming, Database Driven applications, APIs, Files and Data Transformation, ETL and various frameworks. Send details to get started. Rest assured you will have quality solution based on your project requirements. Thanks @CodingHelpLine
$50 USD în 3 zile
4,9 (28 recenzii)
3,8
3,8
Avatarul utilizatorului
I am a qualified C/C++ developer with strong math background. My primary interests are data structures and algorithms. I have hands-on experience, worked in many Projects Before.
$15 USD în 7 zile
5,0 (5 recenzii)
2,7
2,7
Avatarul utilizatorului
I am expert in the field competitive programming (expert account in codeforces). This is my codeforces username if you want to check : chiheb19. I will be glad to do your project.(Already has the solution in mind)
$20 USD în 3 zile
5,0 (1 recenzie)
1,0
1,0

Despre client

Steagul FRANCE
Irvine, France
0,0
0
Metoda de plată a fost confirmată
Membru din oct. 19, 2020

Verificarea clientului

Mulțumim! Ți-am trimis prin e-mail linkul pe care trebuie să-l accesezi pentru a revendica creditul gratuit.
A apărut o eroare la trimiterea e-mailului. Încearcă din nou.
Utilizatori înregistrați Totalul proiectelor postate
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Se încarcă previzualizarea
S-a oferit permisiunea de depistare a locației.
Ți-a expirat sesiunea pentru conectare sau te-ai deconectat. Conectează-te din nou.