Writing a Sorting Algorithm -- NEED HELP!
-
Introduction to the data: NOAA's National Centers for Environmental Information collects global climate data and aggregates this data to provide information on climate trends and variability. One product they offer is a monthly regional analysis. The following table gives "anomaly" data by continent for January 2017. "Anomaly" means the value is the temperature difference from the average temperature from years 1910–2000. Continent Anomaly (C) North America 3.18 South America 1.36 Europe -0.12 Africa 0.53 Asia 1.92 Oceania 0.98 Assignment task: Your task is to develop an algorithm that would sort data such as these from least to greatest. Specifically, given an unsorted set of N decimal values, your algorithm should sort them to give an answer of the sorted data. For this set of N = 6, your algorithm should produce: -0.12 0.53 0.98 1.36 1.92 3.18 Execute your algorithm for a different set of data, such as a subset of the given data, data you make up, or another month's climate data, such as February 2017: https://www.ncdc.noaa.gov/sotc/global-regions/201702 Does your algorithm work for any N? Have you thought of corner cases it might need to handle, such as N = 0 or N = 1?
-
Introduction to the data: NOAA's National Centers for Environmental Information collects global climate data and aggregates this data to provide information on climate trends and variability. One product they offer is a monthly regional analysis. The following table gives "anomaly" data by continent for January 2017. "Anomaly" means the value is the temperature difference from the average temperature from years 1910–2000. Continent Anomaly (C) North America 3.18 South America 1.36 Europe -0.12 Africa 0.53 Asia 1.92 Oceania 0.98 Assignment task: Your task is to develop an algorithm that would sort data such as these from least to greatest. Specifically, given an unsorted set of N decimal values, your algorithm should sort them to give an answer of the sorted data. For this set of N = 6, your algorithm should produce: -0.12 0.53 0.98 1.36 1.92 3.18 Execute your algorithm for a different set of data, such as a subset of the given data, data you make up, or another month's climate data, such as February 2017: https://www.ncdc.noaa.gov/sotc/global-regions/201702 Does your algorithm work for any N? Have you thought of corner cases it might need to handle, such as N = 0 or N = 1?
Please don't cross post.
-
Please don't cross post.
Sorry about that! First time using this website.
-
Sorry about that! First time using this website.
-
Introduction to the data: NOAA's National Centers for Environmental Information collects global climate data and aggregates this data to provide information on climate trends and variability. One product they offer is a monthly regional analysis. The following table gives "anomaly" data by continent for January 2017. "Anomaly" means the value is the temperature difference from the average temperature from years 1910–2000. Continent Anomaly (C) North America 3.18 South America 1.36 Europe -0.12 Africa 0.53 Asia 1.92 Oceania 0.98 Assignment task: Your task is to develop an algorithm that would sort data such as these from least to greatest. Specifically, given an unsorted set of N decimal values, your algorithm should sort them to give an answer of the sorted data. For this set of N = 6, your algorithm should produce: -0.12 0.53 0.98 1.36 1.92 3.18 Execute your algorithm for a different set of data, such as a subset of the given data, data you make up, or another month's climate data, such as February 2017: https://www.ncdc.noaa.gov/sotc/global-regions/201702 Does your algorithm work for any N? Have you thought of corner cases it might need to handle, such as N = 0 or N = 1?
I'm seeing the word you/your seven times in that post. Somehow I do not feel that translates to us. if you need help with something you did, feel free to post the code, tell what it does or doesn't do, what it should do, and what you've tried. Ask specific questions, rather than broad questions.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles