SlideShare a Scribd company logo
1 of 1
Download to read offline
5. The cats are all tagged with RFID chips and when they get close to sensors spread around the
lounge area, a coordinate gets logged. A Coord is a methodless data object with two public
fields: x and y. We use the Coord objects to plot where cats like to go on a 2D (top-down)
heatmap so we do not consider the z-axis at this time. Define a static function heardingCats().
which consumes two parameters: a LinkedList < Coord > of the last known whereabouts of all of
the cats as well as a Coord of interest and produces the Coord in the linked list that is closest in
distance to the second parameter. The x and y value can be negative. If an empty list of Coords is
given, then produce null. In the case of a tie, produce the coord that occurs later in the list. While
coords are expressed as 2 integers for x and y, the distance between them is better expressed as a
double. Be mindful of integer divion (you may want to cast to a double somehow). Use the Math
library. 6. The goats are all on a strict diet since they keep trying to eat the sensor wires. We
periodically measure them and check if there needs to be any changes. Define a static function
goatBloat(). which consumes three arguments two ArrayList < Double > representing the current
weight of each goat and the target weight of each goat in grams, and then a single double
representing the amount of error tolerance we are willing to accept in grams. Produce an int
which represents how many goats are outside (exclusive) of the error tolerance of their target
weight (either because they are too heavy or too light). If the lengths of the lists are uneven, then
only compare through the length of the shorter list (ignore the rest of the longer list) If a current
weight or target weight is <=0, skip this pair of numbers.

More Related Content

More from chennaiallfoodwear

9. Auden makes three types of vitamin supplements, all of which requi.pdf
 9. Auden makes three types of vitamin supplements, all of which requi.pdf 9. Auden makes three types of vitamin supplements, all of which requi.pdf
9. Auden makes three types of vitamin supplements, all of which requi.pdfchennaiallfoodwear
 
9. Based on your resulta above, how would you clansify each organism .pdf
 9. Based on your resulta above, how would you clansify each organism .pdf 9. Based on your resulta above, how would you clansify each organism .pdf
9. Based on your resulta above, how would you clansify each organism .pdfchennaiallfoodwear
 
9. (10 points) Write a sentence question Write one interesting fact .pdf
 9. (10 points) Write a sentence question Write one interesting fact .pdf 9. (10 points) Write a sentence question Write one interesting fact .pdf
9. (10 points) Write a sentence question Write one interesting fact .pdfchennaiallfoodwear
 
9. Chymotrypsin is a serine protease enzyme that continues to vee sub.pdf
 9. Chymotrypsin is a serine protease enzyme that continues to vee sub.pdf 9. Chymotrypsin is a serine protease enzyme that continues to vee sub.pdf
9. Chymotrypsin is a serine protease enzyme that continues to vee sub.pdfchennaiallfoodwear
 
9) What are the two modes an operating .pdf
 9) What are the two modes an operating .pdf 9) What are the two modes an operating .pdf
9) What are the two modes an operating .pdfchennaiallfoodwear
 
8.4 Put cognitive and language milestones into the order in which t.pdf
 8.4 Put cognitive and language milestones into the order in which t.pdf 8.4 Put cognitive and language milestones into the order in which t.pdf
8.4 Put cognitive and language milestones into the order in which t.pdfchennaiallfoodwear
 
8. Two jobs P, and Q have to be assigned among four workers A, B, C a.pdf
 8. Two jobs P, and Q have to be assigned among four workers A, B, C a.pdf 8. Two jobs P, and Q have to be assigned among four workers A, B, C a.pdf
8. Two jobs P, and Q have to be assigned among four workers A, B, C a.pdfchennaiallfoodwear
 
8. W. Fagle inc, uses a standard cost system. During the most recent .pdf
 8. W. Fagle inc, uses a standard cost system. During the most recent .pdf 8. W. Fagle inc, uses a standard cost system. During the most recent .pdf
8. W. Fagle inc, uses a standard cost system. During the most recent .pdfchennaiallfoodwear
 
8. Below is a diagram of the Enzyme Rubisco (RuDP) which is involved .pdf
 8. Below is a diagram of the Enzyme Rubisco (RuDP) which is involved .pdf 8. Below is a diagram of the Enzyme Rubisco (RuDP) which is involved .pdf
8. Below is a diagram of the Enzyme Rubisco (RuDP) which is involved .pdfchennaiallfoodwear
 
6) What are cholinergic receptors Which part of the autonomic ne.pdf
 6) What are cholinergic receptors Which part of the autonomic ne.pdf 6) What are cholinergic receptors Which part of the autonomic ne.pdf
6) What are cholinergic receptors Which part of the autonomic ne.pdfchennaiallfoodwear
 
51 Pegasi b is referred to in The Planet Factory as the impossible p.pdf
 51 Pegasi b is referred to in The Planet Factory as the impossible p.pdf 51 Pegasi b is referred to in The Planet Factory as the impossible p.pdf
51 Pegasi b is referred to in The Planet Factory as the impossible p.pdfchennaiallfoodwear
 
5.10. An airline at the Houston Airport tried to please its passe.pdf
 5.10. An airline at the Houston Airport tried to please its passe.pdf 5.10. An airline at the Houston Airport tried to please its passe.pdf
5.10. An airline at the Houston Airport tried to please its passe.pdfchennaiallfoodwear
 
6) The international financial crisis of 2007 was the result of A.pdf
 6) The international financial crisis of 2007 was the result of A.pdf 6) The international financial crisis of 2007 was the result of A.pdf
6) The international financial crisis of 2007 was the result of A.pdfchennaiallfoodwear
 
6. Assume that saving in China has been used to finance investment in.pdf
 6. Assume that saving in China has been used to finance investment in.pdf 6. Assume that saving in China has been used to finance investment in.pdf
6. Assume that saving in China has been used to finance investment in.pdfchennaiallfoodwear
 
6) All the following are functions of the structure identified in the.pdf
 6) All the following are functions of the structure identified in the.pdf 6) All the following are functions of the structure identified in the.pdf
6) All the following are functions of the structure identified in the.pdfchennaiallfoodwear
 
50. One way a neurotransmitter can cause an excitatory postsynaptic p.pdf
 50. One way a neurotransmitter can cause an excitatory postsynaptic p.pdf 50. One way a neurotransmitter can cause an excitatory postsynaptic p.pdf
50. One way a neurotransmitter can cause an excitatory postsynaptic p.pdfchennaiallfoodwear
 
52. Presynaptic facilitation occurs when A) a neuron produces neurot.pdf
 52. Presynaptic facilitation occurs when A) a neuron produces neurot.pdf 52. Presynaptic facilitation occurs when A) a neuron produces neurot.pdf
52. Presynaptic facilitation occurs when A) a neuron produces neurot.pdfchennaiallfoodwear
 
6. Assume the time T in between any two email messages ar.pdf
 6. Assume the time T in between any two email messages ar.pdf 6. Assume the time T in between any two email messages ar.pdf
6. Assume the time T in between any two email messages ar.pdfchennaiallfoodwear
 
6. Consider the data set that is summarized in the Minitab output bel.pdf
 6. Consider the data set that is summarized in the Minitab output bel.pdf 6. Consider the data set that is summarized in the Minitab output bel.pdf
6. Consider the data set that is summarized in the Minitab output bel.pdfchennaiallfoodwear
 
7. Was Adam Smith optimistic or pessimistic about the effect on socie.pdf
 7. Was Adam Smith optimistic or pessimistic about the effect on socie.pdf 7. Was Adam Smith optimistic or pessimistic about the effect on socie.pdf
7. Was Adam Smith optimistic or pessimistic about the effect on socie.pdfchennaiallfoodwear
 

More from chennaiallfoodwear (20)

9. Auden makes three types of vitamin supplements, all of which requi.pdf
 9. Auden makes three types of vitamin supplements, all of which requi.pdf 9. Auden makes three types of vitamin supplements, all of which requi.pdf
9. Auden makes three types of vitamin supplements, all of which requi.pdf
 
9. Based on your resulta above, how would you clansify each organism .pdf
 9. Based on your resulta above, how would you clansify each organism .pdf 9. Based on your resulta above, how would you clansify each organism .pdf
9. Based on your resulta above, how would you clansify each organism .pdf
 
9. (10 points) Write a sentence question Write one interesting fact .pdf
 9. (10 points) Write a sentence question Write one interesting fact .pdf 9. (10 points) Write a sentence question Write one interesting fact .pdf
9. (10 points) Write a sentence question Write one interesting fact .pdf
 
9. Chymotrypsin is a serine protease enzyme that continues to vee sub.pdf
 9. Chymotrypsin is a serine protease enzyme that continues to vee sub.pdf 9. Chymotrypsin is a serine protease enzyme that continues to vee sub.pdf
9. Chymotrypsin is a serine protease enzyme that continues to vee sub.pdf
 
9) What are the two modes an operating .pdf
 9) What are the two modes an operating .pdf 9) What are the two modes an operating .pdf
9) What are the two modes an operating .pdf
 
8.4 Put cognitive and language milestones into the order in which t.pdf
 8.4 Put cognitive and language milestones into the order in which t.pdf 8.4 Put cognitive and language milestones into the order in which t.pdf
8.4 Put cognitive and language milestones into the order in which t.pdf
 
8. Two jobs P, and Q have to be assigned among four workers A, B, C a.pdf
 8. Two jobs P, and Q have to be assigned among four workers A, B, C a.pdf 8. Two jobs P, and Q have to be assigned among four workers A, B, C a.pdf
8. Two jobs P, and Q have to be assigned among four workers A, B, C a.pdf
 
8. W. Fagle inc, uses a standard cost system. During the most recent .pdf
 8. W. Fagle inc, uses a standard cost system. During the most recent .pdf 8. W. Fagle inc, uses a standard cost system. During the most recent .pdf
8. W. Fagle inc, uses a standard cost system. During the most recent .pdf
 
8. Below is a diagram of the Enzyme Rubisco (RuDP) which is involved .pdf
 8. Below is a diagram of the Enzyme Rubisco (RuDP) which is involved .pdf 8. Below is a diagram of the Enzyme Rubisco (RuDP) which is involved .pdf
8. Below is a diagram of the Enzyme Rubisco (RuDP) which is involved .pdf
 
6) What are cholinergic receptors Which part of the autonomic ne.pdf
 6) What are cholinergic receptors Which part of the autonomic ne.pdf 6) What are cholinergic receptors Which part of the autonomic ne.pdf
6) What are cholinergic receptors Which part of the autonomic ne.pdf
 
51 Pegasi b is referred to in The Planet Factory as the impossible p.pdf
 51 Pegasi b is referred to in The Planet Factory as the impossible p.pdf 51 Pegasi b is referred to in The Planet Factory as the impossible p.pdf
51 Pegasi b is referred to in The Planet Factory as the impossible p.pdf
 
5.10. An airline at the Houston Airport tried to please its passe.pdf
 5.10. An airline at the Houston Airport tried to please its passe.pdf 5.10. An airline at the Houston Airport tried to please its passe.pdf
5.10. An airline at the Houston Airport tried to please its passe.pdf
 
6) The international financial crisis of 2007 was the result of A.pdf
 6) The international financial crisis of 2007 was the result of A.pdf 6) The international financial crisis of 2007 was the result of A.pdf
6) The international financial crisis of 2007 was the result of A.pdf
 
6. Assume that saving in China has been used to finance investment in.pdf
 6. Assume that saving in China has been used to finance investment in.pdf 6. Assume that saving in China has been used to finance investment in.pdf
6. Assume that saving in China has been used to finance investment in.pdf
 
6) All the following are functions of the structure identified in the.pdf
 6) All the following are functions of the structure identified in the.pdf 6) All the following are functions of the structure identified in the.pdf
6) All the following are functions of the structure identified in the.pdf
 
50. One way a neurotransmitter can cause an excitatory postsynaptic p.pdf
 50. One way a neurotransmitter can cause an excitatory postsynaptic p.pdf 50. One way a neurotransmitter can cause an excitatory postsynaptic p.pdf
50. One way a neurotransmitter can cause an excitatory postsynaptic p.pdf
 
52. Presynaptic facilitation occurs when A) a neuron produces neurot.pdf
 52. Presynaptic facilitation occurs when A) a neuron produces neurot.pdf 52. Presynaptic facilitation occurs when A) a neuron produces neurot.pdf
52. Presynaptic facilitation occurs when A) a neuron produces neurot.pdf
 
6. Assume the time T in between any two email messages ar.pdf
 6. Assume the time T in between any two email messages ar.pdf 6. Assume the time T in between any two email messages ar.pdf
6. Assume the time T in between any two email messages ar.pdf
 
6. Consider the data set that is summarized in the Minitab output bel.pdf
 6. Consider the data set that is summarized in the Minitab output bel.pdf 6. Consider the data set that is summarized in the Minitab output bel.pdf
6. Consider the data set that is summarized in the Minitab output bel.pdf
 
7. Was Adam Smith optimistic or pessimistic about the effect on socie.pdf
 7. Was Adam Smith optimistic or pessimistic about the effect on socie.pdf 7. Was Adam Smith optimistic or pessimistic about the effect on socie.pdf
7. Was Adam Smith optimistic or pessimistic about the effect on socie.pdf
 

Recently uploaded

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 

Recently uploaded (20)

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 

5. The cats are all tagged with RFID chips and when they get close to.pdf

  • 1. 5. The cats are all tagged with RFID chips and when they get close to sensors spread around the lounge area, a coordinate gets logged. A Coord is a methodless data object with two public fields: x and y. We use the Coord objects to plot where cats like to go on a 2D (top-down) heatmap so we do not consider the z-axis at this time. Define a static function heardingCats(). which consumes two parameters: a LinkedList < Coord > of the last known whereabouts of all of the cats as well as a Coord of interest and produces the Coord in the linked list that is closest in distance to the second parameter. The x and y value can be negative. If an empty list of Coords is given, then produce null. In the case of a tie, produce the coord that occurs later in the list. While coords are expressed as 2 integers for x and y, the distance between them is better expressed as a double. Be mindful of integer divion (you may want to cast to a double somehow). Use the Math library. 6. The goats are all on a strict diet since they keep trying to eat the sensor wires. We periodically measure them and check if there needs to be any changes. Define a static function goatBloat(). which consumes three arguments two ArrayList < Double > representing the current weight of each goat and the target weight of each goat in grams, and then a single double representing the amount of error tolerance we are willing to accept in grams. Produce an int which represents how many goats are outside (exclusive) of the error tolerance of their target weight (either because they are too heavy or too light). If the lengths of the lists are uneven, then only compare through the length of the shorter list (ignore the rest of the longer list) If a current weight or target weight is <=0, skip this pair of numbers.