Find Jobs
Hire Freelancers

Need in 3 days. Must be in in R5RS, Write a function has-subtarget?

$75-200 USD

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

$75-200 USD

Teljesítéskor fizetve
1.) The source code must be in R5RS. Any other scheme or lisp dialect. 2.) 1 - 2 page description of your algorithm and its complexity as an ACII text document, MS Word document, or a PDF file. 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. Example Calls: If the list is ‘(1 2 3) and you decide to use two additional auxiliary parameters, has-subtarget? should be called as follows. (has-subtarget? ‘(1 2 3) 0 0) If three auxiliary parameters are used then the call should be: (has-subtarget? ‘(1 2 3) 0 0 0) Test Calls: ‘ (2 1 3 9 4 8) returns true because {2 4 3} and {1 8} both sum to 9. ‘(1 1 2 2) returns true because {1 1} and {2} both sum to 2, however… ‘(1 1 2) returns false because there are no two sublists have sums that are a target in the list. ‘(5 6 7) returns false because no two sublists have sums that are a target in the list. '(17 35 1 26 24 12 25 40 33 31) returns false. ‘(6 21 84 66 100 53 73 38 29 81 66 69 54 8 94) returns true. 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ó: 18237308

A projektről

1 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
i can assist you with Must be in R5RS, and i can Write a function has sub-target, I am an expert, I have effectively executed numerous designing errands than you can ever envision both on consultant and off consultant. It will be a joy working with you on this one Sir. Much appreciated
$75 USD 2 napon belül
4,8 (12 értékelés)
4,3
4,3

Az ügyfélről

UNITED STATES zászlója
Clinton, United States
0,0
0
Fizetési mód hitelesítve
Tagság kezdete: nov. 26, 2018

Ügyfél-hitelesítés

További munkák ettől az ügyféltől

Small program wrote in R5RS done today
$30-250 USD
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.