Find Jobs
Hire Freelancers

R5RS Algorithm Complexity

$30-250 USD

Teljesítve
Kiadva ekkor: több mint 5 évvel ezelőtt

$30-250 USD

Teljesítéskor fizetve
This project must be completed in R5RS ([login to view URL]) dialect of Scheme. I also require a written description of the algorithm and its complexity. I invite you to write a function has-subtarget? that takes a list of three or more positive integers, duplicates are possible and 0 is not included, and returns true (#t) if there are two non-empty sublists whose sums are both equal to a value in the list that is not part of either sublist. False (#f), if no two such sublists exist. The values of the sublist do not need to be contiguous in the original list. Not all values need to be used. In other words, values can belong to either sublist or neither sublist. They cannot, however, belong to both sublists at the same time. The list passed to has-target-num? is flat, i.e., it does not itself contain sublists. It is up to you to choose the auxiliary parameters that has-target-num? takes. Auxiliary parameters are parameters used to help find the solution and are scalar. In other words, they hold single values not a collection of values. The list parameter is mandatory is not an auxiliary parameter. All auxiliary parameters must be numeric and must be initialized to zero when the function is called. There may be more than two values that have two sublists or more than two sublists that equal some value. In both cases a single true (#t) should be returned. The whole code solution must be packed into one recursive function, has-subtarget?, which must look as follows: (define has-subtarget? (lambda (<list L followed by your auxiliary parameters of your choice>) (cond … )))
Projektazonosító: 18221364

A projektről

3 ajánlat
Távolról teljesíthető projekt
Aktiválva: 5 évvel ezelőtt

Szeretne pénzt keresni?

A Freelancer oldalán történő árajánlatadás előnyei

Határozzon meg költségvetést és időkeretet
Kapja meg fizetését a munkáért
Vázolja ajánlatát
Ingyen regisztrálhat és adhat árajánlatot munkákra
Neki odaítélve:
Felhasználó avatár
Hello Sir, I am a computer science tutor, I teach (among others) Scheme R5RS, Racket, LISP, Haskell, and Advanced Algorithms. I have done many projects like this, and I'm one of the top Scheme developers, and you can check by clicking on my profile picture. Please contact me for more details when possible. I look forward to work for you, Sir. Best Regards.
$90 USD 3 napon belül
4,9 (106 értékelés)
6,5
6,5
3 szabadúszó adott átlagosan $148 USD összegű árajánlatot erre a munkára
Felhasználó avatár
(3-sum '(2 (3 (4 (2 34))) ((6 (18) 3 5)) (29 3) 8)) (3-sum '((3 (4 (2 34))) ((6 (18) 3 5)))) (3-sum '(0 (3 (4 (2 34))) ((6 (18) 3 5)) (29 3) 8)) 117 "Smaller-List" "Start-by Zero" I thing you want something like : for (has-subtarget? '(2 34) '(2 (3 (4 (2 34))) ((6 (18) 3 5)) (29 3) 36)) return #t but (has-subtarget? '(29 3) '(2 (3 (4 (2 34))) ((6 (18) 3 5)) (29 3) 36)) return #f if the upper functions are right then please tell me. i already computed the sum for plain list and tree list as well and also completed some sort of constraints you depicted.
$200 USD 3 napon belül
0,0 (0 értékelés)
0,0
0,0

Az ügyfélről

UNITED STATES zászlója
Poplar Grove, United States
5,0
6
Fizetési mód hitelesítve
Tagság kezdete: dec. 4, 2017

Ügyfél-hitelesítés

Köszönjük! E-mailben elküldtük a linket, melyen átveheti ajándék egyenlegét.
E-mailje elküldése során valami hiba történt. Kérjük, próbálja újra.
Regisztrált Felhasználók Összes Közzétett Munka
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Előnézet betöltése
Hozzáférést adott a helymeghatározáshoz.
Belépési munkamenete lejárt, és kijelentkeztettük. Kérjük, lépjen be újra.