Julia/Haskell
Write the following programs in both Julia and Haskell. Assume there are no duplicates in the list of numbers.
1. Write a program to find all pairs of numbers in a given list which add up to a given sum eg. if list = (1,3,8,12,7,11,9,4,2,10,5)
and sum = 12
pair: (1,11), (2,10), (3,9), (4,8)
Input: a list of numbers and a sum
Output: The list of pairs with the respective sum
2. Extend your program to include all possible sums
eg. Sums = 5, 6, 7, 8, , 23
Input: A list of numbers
Output: a list of tuples where each tuple is the sum followed by the list of pairs.
Programming
[SOLVED] Haskell Julia/Haskell
$25
File Name: Haskell_Julia/Haskell.zip
File Size: 197.82 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.