Team Ai
Datasetpublic

TGPRO32/Paragon-coding

NOTICE This was done by me, someone with a learning Disability. So please do bare with me when updating this with more working data. Multi-Language Programming Code Dataset A curated dataset of original, non-scraped code examples across 7 programming environments: Python, JavaScript, Node.js, Java, C, C++, and Rust. The dataset ships in two parts that can be used separately or combined: File Rows Description code_dataset.jsonl / .csv 105 Hand-written… See the full description on the dataset page: https://huggingface.co/datasets/TGPRO32/Paragon-coding.

sourceHugging Facemitupdated 25d agoView on Hugging Face
2likes183downloads
code_dataset_large.csv27898 linesDownload Raw Back to root
1id,language,category,difficulty,task_description,code,explanation
21,Python,Sorting Algorithm,intermediate,Sort a 5-element array of ints in ascending order using bubble sort.,"def bubble_sort(buffer):3    n = len(buffer)4    for i in range(n):5        for j in range(0, n - i - 1):6            if buffer[j] > buffer[j + 1]:7                buffer[j], buffer[j + 1] = buffer[j + 1], buffer[j]8    return buffer9 10print(bubble_sort([-22, -44, 20, 12, 7]))","Bubble sort on int data, variable named 'buffer', 5 elements."
112,Python,Sorting Algorithm,intermediate,Sort a 5-element array of ints in ascending order using bubble sort.,"def bubble_sort(values):12    n = len(values)13    for i in range(n):14        for j in range(0, n - i - 1):15            if values[j] > values[j + 1]:16                values[j], values[j + 1] = values[j + 1], values[j]17    return values18 19print(bubble_sort([-24, 89, -28, 58, -42]))","Bubble sort on int data, variable named 'values', 5 elements."
203,Python,Sorting Algorithm,intermediate,Sort a 5-element array of ints in ascending order using bubble sort.,"def bubble_sort(arr):21    n = len(arr)22    for i in range(n):23        for j in range(0, n - i - 1):24            if arr[j] > arr[j + 1]:25                arr[j], arr[j + 1] = arr[j + 1], arr[j]26    return arr27 28print(bubble_sort([-27, 5, 9, 79, -44]))","Bubble sort on int data, variable named 'arr', 5 elements."
294,Python,Sorting Algorithm,intermediate,Sort a 8-element array of ints in ascending order using bubble sort.,"def bubble_sort(input_arr):30    n = len(input_arr)31    for i in range(n):32        for j in range(0, n - i - 1):33            if input_arr[j] > input_arr[j + 1]:34                input_arr[j], input_arr[j + 1] = input_arr[j + 1], input_arr[j]35    return input_arr36 37print(bubble_sort([0, 89, 57, 6, 64, 21, -49, -10]))","Bubble sort on int data, variable named 'input_arr', 8 elements."
385,Python,Sorting Algorithm,intermediate,Sort a 8-element array of ints in ascending order using bubble sort.,"def bubble_sort(seq):39    n = len(seq)40    for i in range(n):41        for j in range(0, n - i - 1):42            if seq[j] > seq[j + 1]:43                seq[j], seq[j + 1] = seq[j + 1], seq[j]44    return seq45 46print(bubble_sort([58, 37, 21, -11, 5, 36, -24, -27]))","Bubble sort on int data, variable named 'seq', 8 elements."
476,Python,Sorting Algorithm,intermediate,Sort a 8-element array of ints in ascending order using bubble sort.,"def bubble_sort(collection):48    n = len(collection)49    for i in range(n):50        for j in range(0, n - i - 1):51            if collection[j] > collection[j + 1]:52                collection[j], collection[j + 1] = collection[j + 1], collection[j]53    return collection54 55print(bubble_sort([-26, 41, 38, 17, -39, 67, 87, -19]))","Bubble sort on int data, variable named 'collection', 8 elements."
567,Python,Sorting Algorithm,intermediate,Sort a 10-element array of ints in ascending order using bubble sort.,"def bubble_sort(entries):57    n = len(entries)58    for i in range(n):59        for j in range(0, n - i - 1):60            if entries[j] > entries[j + 1]:61                entries[j], entries[j + 1] = entries[j + 1], entries[j]62    return entries63 64print(bubble_sort([46, -30, 91, 25, 42, 97, -1, -33, -39, 8]))","Bubble sort on int data, variable named 'entries', 10 elements."
658,Python,Sorting Algorithm,intermediate,Sort a 10-element array of ints in ascending order using bubble sort.,"def bubble_sort(vals):66    n = len(vals)67    for i in range(n):68        for j in range(0, n - i - 1):69            if vals[j] > vals[j + 1]:70                vals[j], vals[j + 1] = vals[j + 1], vals[j]71    return vals72 73print(bubble_sort([24, -30, 9, -25, 47, 21, 66, 43, -9, 44]))","Bubble sort on int data, variable named 'vals', 10 elements."
749,Python,Sorting Algorithm,intermediate,Sort a 10-element array of ints in ascending order using bubble sort.,"def bubble_sort(list1):75    n = len(list1)76    for i in range(n):77        for j in range(0, n - i - 1):78            if list1[j] > list1[j + 1]:79                list1[j], list1[j + 1] = list1[j + 1], list1[j]80    return list181 82print(bubble_sort([3, 18, -32, -7, 86, 12, -9, 68, 47, 19]))","Bubble sort on int data, variable named 'list1', 10 elements."
8310,Python,Sorting Algorithm,intermediate,Sort a 12-element array of ints in ascending order using bubble sort.,"def bubble_sort(entries):84    n = len(entries)85    for i in range(n):86        for j in range(0, n - i - 1):87            if entries[j] > entries[j + 1]:88                entries[j], entries[j + 1] = entries[j + 1], entries[j]89    return entries90 91print(bubble_sort([92, 6, 33, -36, 8, -42, 30, 52, 18, -34, 4, 95]))","Bubble sort on int data, variable named 'entries', 12 elements."
9211,Python,Sorting Algorithm,intermediate,Sort a 12-element array of ints in ascending order using bubble sort.,"def bubble_sort(entries):93    n = len(entries)94    for i in range(n):95        for j in range(0, n - i - 1):96            if entries[j] > entries[j + 1]:97                entries[j], entries[j + 1] = entries[j + 1], entries[j]98    return entries99 100print(bubble_sort([30, 4, 77, 51, 67, -14, 17, -15, 13, 93, 87, 17]))","Bubble sort on int data, variable named 'entries', 12 elements."
10112,Python,Sorting Algorithm,intermediate,Sort a 12-element array of ints in ascending order using bubble sort.,"def bubble_sort(seq):102    n = len(seq)103    for i in range(n):104        for j in range(0, n - i - 1):105            if seq[j] > seq[j + 1]:106                seq[j], seq[j + 1] = seq[j + 1], seq[j]107    return seq108 109print(bubble_sort([99, 59, 99, 52, 42, 6, -15, 80, 76, -27, -38, -22]))","Bubble sort on int data, variable named 'seq', 12 elements."
11013,Python,Sorting Algorithm,intermediate,Sort a 15-element array of ints in ascending order using bubble sort.,"def bubble_sort(values):111    n = len(values)112    for i in range(n):113        for j in range(0, n - i - 1):114            if values[j] > values[j + 1]:115                values[j], values[j + 1] = values[j + 1], values[j]116    return values117 118print(bubble_sort([-10, 58, -34, 48, 47, 69, 85, 14, 91, -48, -21, 87, 18, 37, -22]))","Bubble sort on int data, variable named 'values', 15 elements."
11914,Python,Sorting Algorithm,intermediate,Sort a 15-element array of ints in ascending order using bubble sort.,"def bubble_sort(nums):120    n = len(nums)121    for i in range(n):122        for j in range(0, n - i - 1):123            if nums[j] > nums[j + 1]:124                nums[j], nums[j + 1] = nums[j + 1], nums[j]125    return nums126 127print(bubble_sort([61, -10, 66, -50, 17, 78, -5, 79, -23, 26, 79, 0, -11, 45, -9]))","Bubble sort on int data, variable named 'nums', 15 elements."
12815,Python,Sorting Algorithm,intermediate,Sort a 15-element array of ints in ascending order using bubble sort.,"def bubble_sort(input_arr):129    n = len(input_arr)130    for i in range(n):131        for j in range(0, n - i - 1):132            if input_arr[j] > input_arr[j + 1]:133                input_arr[j], input_arr[j + 1] = input_arr[j + 1], input_arr[j]134    return input_arr135 136print(bubble_sort([85, -50, 32, 75, -46, -22, 42, 28, 11, -36, 11, 95, -30, -29, 74]))","Bubble sort on int data, variable named 'input_arr', 15 elements."
13716,Python,Sorting Algorithm,intermediate,Sort a 20-element array of ints in ascending order using bubble sort.,"def bubble_sort(records):138    n = len(records)139    for i in range(n):140        for j in range(0, n - i - 1):141            if records[j] > records[j + 1]:142                records[j], records[j + 1] = records[j + 1], records[j]143    return records144 145print(bubble_sort([-33, 86, -18, -18, 71, 90, -8, 17, 85, 58, 4, 88, 1, 29, 52, 45, 62, 82, 65, -20]))","Bubble sort on int data, variable named 'records', 20 elements."
14617,Python,Sorting Algorithm,intermediate,Sort a 20-element array of ints in ascending order using bubble sort.,"def bubble_sort(items):147    n = len(items)148    for i in range(n):149        for j in range(0, n - i - 1):150            if items[j] > items[j + 1]:151                items[j], items[j + 1] = items[j + 1], items[j]152    return items153 154print(bubble_sort([7, -34, 36, -45, 91, 8, 6, -49, -32, -35, 8, -33, -42, 34, -32, 81, 10, 21, 74, 4]))","Bubble sort on int data, variable named 'items', 20 elements."
15518,Python,Sorting Algorithm,intermediate,Sort a 20-element array of ints in ascending order using bubble sort.,"def bubble_sort(input_arr):156    n = len(input_arr)157    for i in range(n):158        for j in range(0, n - i - 1):159            if input_arr[j] > input_arr[j + 1]:160                input_arr[j], input_arr[j + 1] = input_arr[j + 1], input_arr[j]161    return input_arr162 163print(bubble_sort([-17, 96, 97, 71, 12, 71, 54, -2, -26, -26, 60, 40, 58, 55, 69, -37, -25, -35, 53, 36]))","Bubble sort on int data, variable named 'input_arr', 20 elements."
16419,Python,Sorting Algorithm,intermediate,Sort a 5-element array of floats in ascending order using bubble sort.,"def bubble_sort(vals):165    n = len(vals)166    for i in range(n):167        for j in range(0, n - i - 1):168            if vals[j] > vals[j + 1]:169                vals[j], vals[j + 1] = vals[j + 1], vals[j]170    return vals171 172print(bubble_sort([82.54, 9.59, 2.63, 33.39, 30.2]))","Bubble sort on float data, variable named 'vals', 5 elements."
17320,Python,Sorting Algorithm,intermediate,Sort a 5-element array of floats in ascending order using bubble sort.,"def bubble_sort(nums):174    n = len(nums)175    for i in range(n):176        for j in range(0, n - i - 1):177            if nums[j] > nums[j + 1]:178                nums[j], nums[j + 1] = nums[j + 1], nums[j]179    return nums180 181print(bubble_sort([35.05, 84.06, -11.03, 76.15, 81.86]))","Bubble sort on float data, variable named 'nums', 5 elements."
18221,Python,Sorting Algorithm,intermediate,Sort a 5-element array of floats in ascending order using bubble sort.,"def bubble_sort(data):183    n = len(data)184    for i in range(n):185        for j in range(0, n - i - 1):186            if data[j] > data[j + 1]:187                data[j], data[j + 1] = data[j + 1], data[j]188    return data189 190print(bubble_sort([-13.98, 98.91, 79.49, 95.31, 90.24]))","Bubble sort on float data, variable named 'data', 5 elements."
19122,Python,Sorting Algorithm,intermediate,Sort a 8-element array of floats in ascending order using bubble sort.,"def bubble_sort(records):192    n = len(records)193    for i in range(n):194        for j in range(0, n - i - 1):195            if records[j] > records[j + 1]:196                records[j], records[j + 1] = records[j + 1], records[j]197    return records198 199print(bubble_sort([8.13, 28.36, 37.28, 82.89, 87.39, -0.41, -19.74, 26.46]))","Bubble sort on float data, variable named 'records', 8 elements."
20023,Python,Sorting Algorithm,intermediate,Sort a 8-element array of floats in ascending order using bubble sort.,"def bubble_sort(entries):201    n = len(entries)202    for i in range(n):203        for j in range(0, n - i - 1):204            if entries[j] > entries[j + 1]:205                entries[j], entries[j + 1] = entries[j + 1], entries[j]206    return entries207 208print(bubble_sort([73.3, 34.15, 30.34, 93.92, 98.46, 46.14, 65.49, -1.58]))","Bubble sort on float data, variable named 'entries', 8 elements."
20924,Python,Sorting Algorithm,intermediate,Sort a 8-element array of floats in ascending order using bubble sort.,"def bubble_sort(nums):210    n = len(nums)211    for i in range(n):212        for j in range(0, n - i - 1):213            if nums[j] > nums[j + 1]:214                nums[j], nums[j + 1] = nums[j + 1], nums[j]215    return nums216 217print(bubble_sort([5.91, -13.04, 67.55, -12.75, 17.32, -14.03, 36.74, 89.41]))","Bubble sort on float data, variable named 'nums', 8 elements."
21825,Python,Sorting Algorithm,intermediate,Sort a 10-element array of floats in ascending order using bubble sort.,"def bubble_sort(input_arr):219    n = len(input_arr)220    for i in range(n):221        for j in range(0, n - i - 1):222            if input_arr[j] > input_arr[j + 1]:223                input_arr[j], input_arr[j + 1] = input_arr[j + 1], input_arr[j]224    return input_arr225 226print(bubble_sort([-1.27, 94.33, -10.47, 2.11, 50.81, 60.35, 7.99, -5.73, 85.94, 9.3]))","Bubble sort on float data, variable named 'input_arr', 10 elements."
22726,Python,Sorting Algorithm,intermediate,Sort a 10-element array of floats in ascending order using bubble sort.,"def bubble_sort(elements):228    n = len(elements)229    for i in range(n):230        for j in range(0, n - i - 1):231            if elements[j] > elements[j + 1]:232                elements[j], elements[j + 1] = elements[j + 1], elements[j]233    return elements234 235print(bubble_sort([-15.27, -10.24, 58.23, 47.26, 17.65, 11.03, 59.7, 17.39, 11.61, -4.43]))","Bubble sort on float data, variable named 'elements', 10 elements."
23627,Python,Sorting Algorithm,intermediate,Sort a 10-element array of floats in ascending order using bubble sort.,"def bubble_sort(buffer):237    n = len(buffer)238    for i in range(n):239        for j in range(0, n - i - 1):240            if buffer[j] > buffer[j + 1]:241                buffer[j], buffer[j + 1] = buffer[j + 1], buffer[j]242    return buffer243 244print(bubble_sort([15.7, 17.63, 69.47, -11.37, 34.54, 98.82, 98.54, -11.28, 5.37, 11.56]))","Bubble sort on float data, variable named 'buffer', 10 elements."
24528,Python,Sorting Algorithm,intermediate,Sort a 12-element array of floats in ascending order using bubble sort.,"def bubble_sort(entries):246    n = len(entries)247    for i in range(n):248        for j in range(0, n - i - 1):249            if entries[j] > entries[j + 1]:250                entries[j], entries[j + 1] = entries[j + 1], entries[j]251    return entries252 253print(bubble_sort([21.53, -11.81, 9.07, 13.91, 32.14, 44.64, 16.0, 97.08, 76.04, 42.94, 59.48, 46.0]))","Bubble sort on float data, variable named 'entries', 12 elements."
25429,Python,Sorting Algorithm,intermediate,Sort a 12-element array of floats in ascending order using bubble sort.,"def bubble_sort(entries):255    n = len(entries)256    for i in range(n):257        for j in range(0, n - i - 1):258            if entries[j] > entries[j + 1]:259                entries[j], entries[j + 1] = entries[j + 1], entries[j]260    return entries261 262print(bubble_sort([58.94, 91.73, -4.02, -6.26, -7.26, 45.83, 12.41, 51.97, 65.4, 4.23, 55.47, 11.41]))","Bubble sort on float data, variable named 'entries', 12 elements."
26330,Python,Sorting Algorithm,intermediate,Sort a 12-element array of floats in ascending order using bubble sort.,"def bubble_sort(dataset):264    n = len(dataset)265    for i in range(n):266        for j in range(0, n - i - 1):267            if dataset[j] > dataset[j + 1]:268                dataset[j], dataset[j + 1] = dataset[j + 1], dataset[j]269    return dataset270 271print(bubble_sort([9.88, 88.07, -13.95, 55.48, 78.69, -14.75, 19.69, -4.43, 96.6, -0.77, 32.58, 63.97]))","Bubble sort on float data, variable named 'dataset', 12 elements."
27231,Python,Sorting Algorithm,intermediate,Sort a 15-element array of floats in ascending order using bubble sort.,"def bubble_sort(input_arr):273    n = len(input_arr)274    for i in range(n):275        for j in range(0, n - i - 1):276            if input_arr[j] > input_arr[j + 1]:277                input_arr[j], input_arr[j + 1] = input_arr[j + 1], input_arr[j]278    return input_arr279 280print(bubble_sort([-18.85, -11.05, 85.09, 87.57, 44.93, 79.32, 49.32, -2.38, -4.83, 16.68, 86.98, 74.74, 82.42, 86.97, 5.0]))","Bubble sort on float data, variable named 'input_arr', 15 elements."
28132,Python,Sorting Algorithm,intermediate,Sort a 15-element array of floats in ascending order using bubble sort.,"def bubble_sort(items):282    n = len(items)283    for i in range(n):284        for j in range(0, n - i - 1):285            if items[j] > items[j + 1]:286                items[j], items[j + 1] = items[j + 1], items[j]287    return items288 289print(bubble_sort([59.37, 22.09, 46.63, 84.09, 95.89, 69.19, 90.17, 8.17, -0.66, 75.19, 1.07, 29.06, 1.34, 90.01, 73.1]))","Bubble sort on float data, variable named 'items', 15 elements."
29033,Python,Sorting Algorithm,intermediate,Sort a 15-element array of floats in ascending order using bubble sort.,"def bubble_sort(collection):291    n = len(collection)292    for i in range(n):293        for j in range(0, n - i - 1):294            if collection[j] > collection[j + 1]:295                collection[j], collection[j + 1] = collection[j + 1], collection[j]296    return collection297 298print(bubble_sort([75.47, 82.82, 76.48, 11.75, 73.7, -7.14, 83.79, 82.17, 6.47, 77.17, 34.78, 16.32, 74.65, 7.08, -17.18]))","Bubble sort on float data, variable named 'collection', 15 elements."
29934,Python,Sorting Algorithm,intermediate,Sort a 20-element array of floats in ascending order using bubble sort.,"def bubble_sort(items):300    n = len(items)301    for i in range(n):302        for j in range(0, n - i - 1):303            if items[j] > items[j + 1]:304                items[j], items[j + 1] = items[j + 1], items[j]305    return items306 307print(bubble_sort([27.42, 13.15, -11.74, 72.03, 21.79, 40.62, 60.86, 80.4, 19.41, -16.72, 84.37, 11.08, 49.09, 97.04, -15.45, 50.99, 21.14, 73.58, 31.93, 97.12]))","Bubble sort on float data, variable named 'items', 20 elements."
30835,Python,Sorting Algorithm,intermediate,Sort a 20-element array of floats in ascending order using bubble sort.,"def bubble_sort(data):309    n = len(data)310    for i in range(n):311        for j in range(0, n - i - 1):312            if data[j] > data[j + 1]:313                data[j], data[j + 1] = data[j + 1], data[j]314    return data315 316print(bubble_sort([25.84, 48.61, 10.31, 64.35, -19.8, 90.14, 44.08, 65.61, 68.29, 59.8, 23.34, -11.67, 59.04, 19.29, 17.36, 80.91, 65.65, 15.74, 16.8, 28.6]))","Bubble sort on float data, variable named 'data', 20 elements."
31736,Python,Sorting Algorithm,intermediate,Sort a 20-element array of floats in ascending order using bubble sort.,"def bubble_sort(collection):318    n = len(collection)319    for i in range(n):320        for j in range(0, n - i - 1):321            if collection[j] > collection[j + 1]:322                collection[j], collection[j + 1] = collection[j + 1], collection[j]323    return collection324 325print(bubble_sort([62.97, 45.98, 2.83, 59.13, 25.12, 69.03, 0.71, 47.72, 28.32, 79.21, 16.16, 5.01, 73.51, 52.19, 18.35, 32.57, 60.4, 40.83, 74.45, 94.22]))","Bubble sort on float data, variable named 'collection', 20 elements."
32637,JavaScript,Sorting Algorithm,intermediate,Sort a 5-element array of ints in ascending order using bubble sort.,"function bubbleSort(seq) {327  const n = seq.length;328  for (let i = 0; i < n; i++) {329    for (let j = 0; j < n - i - 1; j++) {330      if (seq[j] > seq[j + 1]) {331        [seq[j], seq[j + 1]] = [seq[j + 1], seq[j]];332      }333    }334  }335  return seq;336}337 338console.log(bubbleSort([-7, -29, 22, 81, 35]));","Bubble sort on int data, variable named 'seq', 5 elements."
33938,JavaScript,Sorting Algorithm,intermediate,Sort a 5-element array of ints in ascending order using bubble sort.,"function bubbleSort(data) {340  const n = data.length;341  for (let i = 0; i < n; i++) {342    for (let j = 0; j < n - i - 1; j++) {343      if (data[j] > data[j + 1]) {344        [data[j], data[j + 1]] = [data[j + 1], data[j]];345      }346    }347  }348  return data;349}350 351console.log(bubbleSort([10, 29, 7, 0, -13]));","Bubble sort on int data, variable named 'data', 5 elements."
35239,JavaScript,Sorting Algorithm,intermediate,Sort a 5-element array of ints in ascending order using bubble sort.,"function bubbleSort(arr) {353  const n = arr.length;354  for (let i = 0; i < n; i++) {355    for (let j = 0; j < n - i - 1; j++) {356      if (arr[j] > arr[j + 1]) {357        [arr[j], arr[j + 1]] = [arr[j + 1], arr[j]];358      }359    }360  }361  return arr;362}363 364console.log(bubbleSort([-39, 12, 71, -32, 66]));","Bubble sort on int data, variable named 'arr', 5 elements."
36540,JavaScript,Sorting Algorithm,intermediate,Sort a 8-element array of ints in ascending order using bubble sort.,"function bubbleSort(collection) {366  const n = collection.length;367  for (let i = 0; i < n; i++) {368    for (let j = 0; j < n - i - 1; j++) {369      if (collection[j] > collection[j + 1]) {370        [collection[j], collection[j + 1]] = [collection[j + 1], collection[j]];371      }372    }373  }374  return collection;375}376 377console.log(bubbleSort([97, -1, 48, 76, 52, 12, -13, -49]));","Bubble sort on int data, variable named 'collection', 8 elements."
37841,JavaScript,Sorting Algorithm,intermediate,Sort a 8-element array of ints in ascending order using bubble sort.,"function bubbleSort(entries) {379  const n = entries.length;380  for (let i = 0; i < n; i++) {381    for (let j = 0; j < n - i - 1; j++) {382      if (entries[j] > entries[j + 1]) {383        [entries[j], entries[j + 1]] = [entries[j + 1], entries[j]];384      }385    }386  }387  return entries;388}389 390console.log(bubbleSort([-23, 58, 6, -5, 82, 68, -38, 92]));","Bubble sort on int data, variable named 'entries', 8 elements."
39142,JavaScript,Sorting Algorithm,intermediate,Sort a 8-element array of ints in ascending order using bubble sort.,"function bubbleSort(items) {392  const n = items.length;393  for (let i = 0; i < n; i++) {394    for (let j = 0; j < n - i - 1; j++) {395      if (items[j] > items[j + 1]) {396        [items[j], items[j + 1]] = [items[j + 1], items[j]];397      }398    }399  }400  return items;401}402 403console.log(bubbleSort([-19, 66, -16, 68, 85, 93, 31, 63]));","Bubble sort on int data, variable named 'items', 8 elements."
40443,JavaScript,Sorting Algorithm,intermediate,Sort a 10-element array of ints in ascending order using bubble sort.,"function bubbleSort(elements) {405  const n = elements.length;406  for (let i = 0; i < n; i++) {407    for (let j = 0; j < n - i - 1; j++) {408      if (elements[j] > elements[j + 1]) {409        [elements[j], elements[j + 1]] = [elements[j + 1], elements[j]];410      }411    }412  }413  return elements;414}415 416console.log(bubbleSort([79, 59, 90, 64, -10, 71, 65, 16, 13, 20]));","Bubble sort on int data, variable named 'elements', 10 elements."
41744,JavaScript,Sorting Algorithm,intermediate,Sort a 10-element array of ints in ascending order using bubble sort.,"function bubbleSort(vals) {418  const n = vals.length;419  for (let i = 0; i < n; i++) {420    for (let j = 0; j < n - i - 1; j++) {421      if (vals[j] > vals[j + 1]) {422        [vals[j], vals[j + 1]] = [vals[j + 1], vals[j]];423      }424    }425  }426  return vals;427}428 429console.log(bubbleSort([83, 74, 11, 20, 62, -31, 23, 10, 19, 35]));","Bubble sort on int data, variable named 'vals', 10 elements."
43045,JavaScript,Sorting Algorithm,intermediate,Sort a 10-element array of ints in ascending order using bubble sort.,"function bubbleSort(list1) {431  const n = list1.length;432  for (let i = 0; i < n; i++) {433    for (let j = 0; j < n - i - 1; j++) {434      if (list1[j] > list1[j + 1]) {435        [list1[j], list1[j + 1]] = [list1[j + 1], list1[j]];436      }437    }438  }439  return list1;440}441 442console.log(bubbleSort([88, -30, -15, -12, 9, 48, -11, 4, -34, 56]));","Bubble sort on int data, variable named 'list1', 10 elements."
44346,JavaScript,Sorting Algorithm,intermediate,Sort a 12-element array of ints in ascending order using bubble sort.,"function bubbleSort(collection) {444  const n = collection.length;445  for (let i = 0; i < n; i++) {446    for (let j = 0; j < n - i - 1; j++) {447      if (collection[j] > collection[j + 1]) {448        [collection[j], collection[j + 1]] = [collection[j + 1], collection[j]];449      }450    }451  }452  return collection;453}454 455console.log(bubbleSort([34, 88, 69, 56, -35, 2, 57, 49, 99, -45, 97, 47]));","Bubble sort on int data, variable named 'collection', 12 elements."
45647,JavaScript,Sorting Algorithm,intermediate,Sort a 12-element array of ints in ascending order using bubble sort.,"function bubbleSort(dataset) {457  const n = dataset.length;458  for (let i = 0; i < n; i++) {459    for (let j = 0; j < n - i - 1; j++) {460      if (dataset[j] > dataset[j + 1]) {461        [dataset[j], dataset[j + 1]] = [dataset[j + 1], dataset[j]];462      }463    }464  }465  return dataset;466}467 468console.log(bubbleSort([-49, 40, 26, 49, 57, 87, 89, 6, 74, 6, 19, 61]));","Bubble sort on int data, variable named 'dataset', 12 elements."
46948,JavaScript,Sorting Algorithm,intermediate,Sort a 12-element array of ints in ascending order using bubble sort.,"function bubbleSort(dataset) {470  const n = dataset.length;471  for (let i = 0; i < n; i++) {472    for (let j = 0; j < n - i - 1; j++) {473      if (dataset[j] > dataset[j + 1]) {474        [dataset[j], dataset[j + 1]] = [dataset[j + 1], dataset[j]];475      }476    }477  }478  return dataset;479}480 481console.log(bubbleSort([-43, 49, 36, 53, -8, 69, -18, 86, -44, 50, 94, -44]));","Bubble sort on int data, variable named 'dataset', 12 elements."
48249,JavaScript,Sorting Algorithm,intermediate,Sort a 15-element array of ints in ascending order using bubble sort.,"function bubbleSort(data) {483  const n = data.length;484  for (let i = 0; i < n; i++) {485    for (let j = 0; j < n - i - 1; j++) {486      if (data[j] > data[j + 1]) {487        [data[j], data[j + 1]] = [data[j + 1], data[j]];488      }489    }490  }491  return data;492}493 494console.log(bubbleSort([59, -16, 68, -4, -38, 16, 47, 33, 4, 66, 33, 36, 47, 21, 57]));","Bubble sort on int data, variable named 'data', 15 elements."
49550,JavaScript,Sorting Algorithm,intermediate,Sort a 15-element array of ints in ascending order using bubble sort.,"function bubbleSort(nums) {496  const n = nums.length;497  for (let i = 0; i < n; i++) {498    for (let j = 0; j < n - i - 1; j++) {499      if (nums[j] > nums[j + 1]) {500        [nums[j], nums[j + 1]] = [nums[j + 1], nums[j]];501      }502    }503  }504  return nums;505}506 507console.log(bubbleSort([-30, 70, -46, 88, -37, 39, 7, -33, -40, -43, 13, 1, -45, -11, 11]));","Bubble sort on int data, variable named 'nums', 15 elements."
50851,JavaScript,Sorting Algorithm,intermediate,Sort a 15-element array of ints in ascending order using bubble sort.,"function bubbleSort(values) {509  const n = values.length;510  for (let i = 0; i < n; i++) {511    for (let j = 0; j < n - i - 1; j++) {512      if (values[j] > values[j + 1]) {513        [values[j], values[j + 1]] = [values[j + 1], values[j]];514      }515    }516  }517  return values;518}519 520console.log(bubbleSort([71, -21, 94, 5, 69, 15, 44, -8, -21, -9, 29, -23, 98, -44, 29]));","Bubble sort on int data, variable named 'values', 15 elements."
52152,JavaScript,Sorting Algorithm,intermediate,Sort a 20-element array of ints in ascending order using bubble sort.,"function bubbleSort(elements) {522  const n = elements.length;523  for (let i = 0; i < n; i++) {524    for (let j = 0; j < n - i - 1; j++) {525      if (elements[j] > elements[j + 1]) {526        [elements[j], elements[j + 1]] = [elements[j + 1], elements[j]];527      }528    }529  }530  return elements;531}532 533console.log(bubbleSort([46, 51, 0, -31, 12, -24, 27, -20, 94, -40, 38, 86, 59, 44, -33, 79, 37, -47, 57, 75]));","Bubble sort on int data, variable named 'elements', 20 elements."
53453,JavaScript,Sorting Algorithm,intermediate,Sort a 20-element array of ints in ascending order using bubble sort.,"function bubbleSort(data) {535  const n = data.length;536  for (let i = 0; i < n; i++) {537    for (let j = 0; j < n - i - 1; j++) {538      if (data[j] > data[j + 1]) {539        [data[j], data[j + 1]] = [data[j + 1], data[j]];540      }541    }542  }543  return data;544}545 546console.log(bubbleSort([60, 42, 67, -11, 61, -5, 83, 19, 87, 73, 69, 61, 18, 32, 12, -28, 21, 65, 12, 68]));","Bubble sort on int data, variable named 'data', 20 elements."
54754,JavaScript,Sorting Algorithm,intermediate,Sort a 20-element array of ints in ascending order using bubble sort.,"function bubbleSort(elements) {548  const n = elements.length;549  for (let i = 0; i < n; i++) {550    for (let j = 0; j < n - i - 1; j++) {551      if (elements[j] > elements[j + 1]) {552        [elements[j], elements[j + 1]] = [elements[j + 1], elements[j]];553      }554    }555  }556  return elements;557}558 559console.log(bubbleSort([47, 36, -43, 76, 33, -4, 74, 4, 40, 16, 37, 21, 20, 92, -48, 82, -2, -29, 11, 54]));","Bubble sort on int data, variable named 'elements', 20 elements."
56055,JavaScript,Sorting Algorithm,intermediate,Sort a 5-element array of floats in ascending order using bubble sort.,"function bubbleSort(dataset) {561  const n = dataset.length;562  for (let i = 0; i < n; i++) {563    for (let j = 0; j < n - i - 1; j++) {564      if (dataset[j] > dataset[j + 1]) {565        [dataset[j], dataset[j + 1]] = [dataset[j + 1], dataset[j]];566      }567    }568  }569  return dataset;570}571 572console.log(bubbleSort([46.07, 8.6, 36.66, 64.71, 33.33]));","Bubble sort on float data, variable named 'dataset', 5 elements."
57356,JavaScript,Sorting Algorithm,intermediate,Sort a 5-element array of floats in ascending order using bubble sort.,"function bubbleSort(arr) {574  const n = arr.length;575  for (let i = 0; i < n; i++) {576    for (let j = 0; j < n - i - 1; j++) {577      if (arr[j] > arr[j + 1]) {578        [arr[j], arr[j + 1]] = [arr[j + 1], arr[j]];579      }580    }581  }582  return arr;583}584 585console.log(bubbleSort([-8.93, 6.37, 62.32, 16.44, 49.21]));","Bubble sort on float data, variable named 'arr', 5 elements."
58657,JavaScript,Sorting Algorithm,intermediate,Sort a 5-element array of floats in ascending order using bubble sort.,"function bubbleSort(dataset) {587  const n = dataset.length;588  for (let i = 0; i < n; i++) {589    for (let j = 0; j < n - i - 1; j++) {590      if (dataset[j] > dataset[j + 1]) {591        [dataset[j], dataset[j + 1]] = [dataset[j + 1], dataset[j]];592      }593    }594  }595  return dataset;596}597 598console.log(bubbleSort([45.86, 20.91, 98.6, 45.5, 21.87]));","Bubble sort on float data, variable named 'dataset', 5 elements."
59958,JavaScript,Sorting Algorithm,intermediate,Sort a 8-element array of floats in ascending order using bubble sort.,"function bubbleSort(dataset) {600  const n = dataset.length;601  for (let i = 0; i < n; i++) {602    for (let j = 0; j < n - i - 1; j++) {603      if (dataset[j] > dataset[j + 1]) {604        [dataset[j], dataset[j + 1]] = [dataset[j + 1], dataset[j]];605      }606    }607  }608  return dataset;609}610 611console.log(bubbleSort([12.24, 9.92, -5.64, 2.92, -5.77, 43.77, 70.7, 2.03]));","Bubble sort on float data, variable named 'dataset', 8 elements."
61259,JavaScript,Sorting Algorithm,intermediate,Sort a 8-element array of floats in ascending order using bubble sort.,"function bubbleSort(items) {613  const n = items.length;614  for (let i = 0; i < n; i++) {615    for (let j = 0; j < n - i - 1; j++) {616      if (items[j] > items[j + 1]) {617        [items[j], items[j + 1]] = [items[j + 1], items[j]];618      }619    }620  }621  return items;622}623 624console.log(bubbleSort([67.89, 12.9, 50.16, 70.46, 51.02, 96.68, 79.08, 15.25]));","Bubble sort on float data, variable named 'items', 8 elements."
62560,JavaScript,Sorting Algorithm,intermediate,Sort a 8-element array of floats in ascending order using bubble sort.,"function bubbleSort(list1) {626  const n = list1.length;627  for (let i = 0; i < n; i++) {628    for (let j = 0; j < n - i - 1; j++) {629      if (list1[j] > list1[j + 1]) {630        [list1[j], list1[j + 1]] = [list1[j + 1], list1[j]];631      }632    }633  }634  return list1;635}636 637console.log(bubbleSort([1.35, -18.32, 43.56, 12.64, 95.94, 45.85, 62.99, -4.97]));","Bubble sort on float data, variable named 'list1', 8 elements."
63861,JavaScript,Sorting Algorithm,intermediate,Sort a 10-element array of floats in ascending order using bubble sort.,"function bubbleSort(records) {639  const n = records.length;640  for (let i = 0; i < n; i++) {641    for (let j = 0; j < n - i - 1; j++) {642      if (records[j] > records[j + 1]) {643        [records[j], records[j + 1]] = [records[j + 1], records[j]];644      }645    }646  }647  return records;648}649 650console.log(bubbleSort([69.58, -7.79, -18.54, 13.84, 36.97, 20.54, 94.89, 10.04, 82.55, -6.42]));","Bubble sort on float data, variable named 'records', 10 elements."
65162,JavaScript,Sorting Algorithm,intermediate,Sort a 10-element array of floats in ascending order using bubble sort.,"function bubbleSort(data) {652  const n = data.length;653  for (let i = 0; i < n; i++) {654    for (let j = 0; j < n - i - 1; j++) {655      if (data[j] > data[j + 1]) {656        [data[j], data[j + 1]] = [data[j + 1], data[j]];657      }658    }659  }660  return data;661}662 663console.log(bubbleSort([27.68, -11.18, 54.9, -13.62, -2.25, 46.98, 16.16, 98.28, -5.9, 70.97]));","Bubble sort on float data, variable named 'data', 10 elements."
66463,JavaScript,Sorting Algorithm,intermediate,Sort a 10-element array of floats in ascending order using bubble sort.,"function bubbleSort(elements) {665  const n = elements.length;666  for (let i = 0; i < n; i++) {667    for (let j = 0; j < n - i - 1; j++) {668      if (elements[j] > elements[j + 1]) {669        [elements[j], elements[j + 1]] = [elements[j + 1], elements[j]];670      }671    }672  }673  return elements;674}675 676console.log(bubbleSort([50.94, 53.59, 72.31, 25.26, 88.11, 15.39, 50.03, 31.03, 47.67, -12.83]));","Bubble sort on float data, variable named 'elements', 10 elements."
67764,JavaScript,Sorting Algorithm,intermediate,Sort a 12-element array of floats in ascending order using bubble sort.,"function bubbleSort(seq) {678  const n = seq.length;679  for (let i = 0; i < n; i++) {680    for (let j = 0; j < n - i - 1; j++) {681      if (seq[j] > seq[j + 1]) {682        [seq[j], seq[j + 1]] = [seq[j + 1], seq[j]];683      }684    }685  }686  return seq;687}688 689console.log(bubbleSort([-8.19, 70.77, 54.44, 11.49, -10.34, 8.54, 45.69, -1.37, 28.61, 62.04, 35.92, -16.12]));","Bubble sort on float data, variable named 'seq', 12 elements."
69065,JavaScript,Sorting Algorithm,intermediate,Sort a 12-element array of floats in ascending order using bubble sort.,"function bubbleSort(nums) {691  const n = nums.length;692  for (let i = 0; i < n; i++) {693    for (let j = 0; j < n - i - 1; j++) {694      if (nums[j] > nums[j + 1]) {695        [nums[j], nums[j + 1]] = [nums[j + 1], nums[j]];696      }697    }698  }699  return nums;700}701 702console.log(bubbleSort([64.13, 63.66, 34.03, 61.8, 89.95, 73.75, 54.38, 58.68, 91.11, 30.59, 44.8, 57.07]));","Bubble sort on float data, variable named 'nums', 12 elements."
70366,JavaScript,Sorting Algorithm,intermediate,Sort a 12-element array of floats in ascending order using bubble sort.,"function bubbleSort(entries) {704  const n = entries.length;705  for (let i = 0; i < n; i++) {706    for (let j = 0; j < n - i - 1; j++) {707      if (entries[j] > entries[j + 1]) {708        [entries[j], entries[j + 1]] = [entries[j + 1], entries[j]];709      }710    }711  }712  return entries;713}714 715console.log(bubbleSort([11.61, -3.07, -12.9, 74.32, 50.81, 78.08, 89.62, 32.26, 35.78, 16.19, 27.9, 12.4]));","Bubble sort on float data, variable named 'entries', 12 elements."
71667,JavaScript,Sorting Algorithm,intermediate,Sort a 15-element array of floats in ascending order using bubble sort.,"function bubbleSort(input_arr) {717  const n = input_arr.length;718  for (let i = 0; i < n; i++) {719    for (let j = 0; j < n - i - 1; j++) {720      if (input_arr[j] > input_arr[j + 1]) {721        [input_arr[j], input_arr[j + 1]] = [input_arr[j + 1], input_arr[j]];722      }723    }724  }725  return input_arr;726}727 728console.log(bubbleSort([38.76, -10.43, -15.26, 31.41, 18.36, 9.79, -9.13, 94.47, 79.48, 48.45, 93.14, 98.95, 60.0, 12.07, -15.21]));","Bubble sort on float data, variable named 'input_arr', 15 elements."
72968,JavaScript,Sorting Algorithm,intermediate,Sort a 15-element array of floats in ascending order using bubble sort.,"function bubbleSort(vals) {730  const n = vals.length;731  for (let i = 0; i < n; i++) {732    for (let j = 0; j < n - i - 1; j++) {733      if (vals[j] > vals[j + 1]) {734        [vals[j], vals[j + 1]] = [vals[j + 1], vals[j]];735      }736    }737  }738  return vals;739}740 741console.log(bubbleSort([0.85, 41.76, 32.63, 13.1, 98.64, 31.87, 76.9, 95.32, 35.93, 28.59, 18.21, -7.55, -0.86, 28.99, 38.96]));","Bubble sort on float data, variable named 'vals', 15 elements."
74269,JavaScript,Sorting Algorithm,intermediate,Sort a 15-element array of floats in ascending order using bubble sort.,"function bubbleSort(buffer) {743  const n = buffer.length;744  for (let i = 0; i < n; i++) {745    for (let j = 0; j < n - i - 1; j++) {746      if (buffer[j] > buffer[j + 1]) {747        [buffer[j], buffer[j + 1]] = [buffer[j + 1], buffer[j]];748      }749    }750  }751  return buffer;752}753 754console.log(bubbleSort([92.48, 76.81, 45.46, 34.12, 17.43, 18.47, 95.45, 28.1, 41.24, 97.59, 58.26, 44.57, 29.18, 2.32, 23.05]));","Bubble sort on float data, variable named 'buffer', 15 elements."
75570,JavaScript,Sorting Algorithm,intermediate,Sort a 20-element array of floats in ascending order using bubble sort.,"function bubbleSort(vals) {756  const n = vals.length;757  for (let i = 0; i < n; i++) {758    for (let j = 0; j < n - i - 1; j++) {759      if (vals[j] > vals[j + 1]) {760        [vals[j], vals[j + 1]] = [vals[j + 1], vals[j]];761      }762    }763  }764  return vals;765}766 767console.log(bubbleSort([39.32, 32.6, -13.86, 11.78, -4.41, 14.28, 84.82, 37.68, -16.56, 54.97, 75.12, 64.46, 16.98, -18.37, 28.55, 6.74, 80.13, -6.5, 92.7, 57.08]));","Bubble sort on float data, variable named 'vals', 20 elements."
76871,JavaScript,Sorting Algorithm,intermediate,Sort a 20-element array of floats in ascending order using bubble sort.,"function bubbleSort(values) {769  const n = values.length;770  for (let i = 0; i < n; i++) {771    for (let j = 0; j < n - i - 1; j++) {772      if (values[j] > values[j + 1]) {773        [values[j], values[j + 1]] = [values[j + 1], values[j]];774      }775    }776  }777  return values;778}779 780console.log(bubbleSort([39.31, 65.28, 40.56, 12.54, 79.33, 96.65, 9.0, 45.6, 25.65, 89.7, 40.48, 84.64, 82.82, 12.87, 74.01, 29.38, 91.18, 40.42, 77.65, 13.66]));","Bubble sort on float data, variable named 'values', 20 elements."
78172,JavaScript,Sorting Algorithm,intermediate,Sort a 20-element array of floats in ascending order using bubble sort.,"function bubbleSort(nums) {782  const n = nums.length;783  for (let i = 0; i < n; i++) {784    for (let j = 0; j < n - i - 1; j++) {785      if (nums[j] > nums[j + 1]) {786        [nums[j], nums[j + 1]] = [nums[j + 1], nums[j]];787      }788    }789  }790  return nums;791}792 793console.log(bubbleSort([79.66, 49.01, 58.53, 82.97, 33.14, 37.64, 19.56, 70.78, 24.89, 91.01, 83.48, 96.71, 8.42, 25.57, 81.87, 28.88, 17.86, 36.28, 88.7, 25.37]));","Bubble sort on float data, variable named 'nums', 20 elements."
79473,Node.js,Sorting Algorithm,intermediate,Sort a 5-element array of ints in ascending order using bubble sort.,"function bubbleSort(buffer) {795  const n = buffer.length;796  for (let i = 0; i < n; i++) {797    for (let j = 0; j < n - i - 1; j++) {798      if (buffer[j] > buffer[j + 1]) {799        [buffer[j], buffer[j + 1]] = [buffer[j + 1], buffer[j]];800      }801    }802  }803  return buffer;804}805 806module.exports = { bubbleSort };807console.log(bubbleSort([-12, 76, -41, -18, 78]));","Bubble sort on int data, variable named 'buffer', 5 elements."
80874,Node.js,Sorting Algorithm,intermediate,Sort a 5-element array of ints in ascending order using bubble sort.,"function bubbleSort(elements) {809  const n = elements.length;810  for (let i = 0; i < n; i++) {811    for (let j = 0; j < n - i - 1; j++) {812      if (elements[j] > elements[j + 1]) {813        [elements[j], elements[j + 1]] = [elements[j + 1], elements[j]];814      }815    }816  }817  return elements;818}819 820module.exports = { bubbleSort };821console.log(bubbleSort([34, -25, 62, -25, 84]));","Bubble sort on int data, variable named 'elements', 5 elements."
82275,Node.js,Sorting Algorithm,intermediate,Sort a 5-element array of ints in ascending order using bubble sort.,"function bubbleSort(entries) {823  const n = entries.length;824  for (let i = 0; i < n; i++) {825    for (let j = 0; j < n - i - 1; j++) {826      if (entries[j] > entries[j + 1]) {827        [entries[j], entries[j + 1]] = [entries[j + 1], entries[j]];828      }829    }830  }831  return entries;832}833 834module.exports = { bubbleSort };835console.log(bubbleSort([66, -47, -14, 54, -11]));","Bubble sort on int data, variable named 'entries', 5 elements."
83676,Node.js,Sorting Algorithm,intermediate,Sort a 8-element array of ints in ascending order using bubble sort.,"function bubbleSort(data) {837  const n = data.length;838  for (let i = 0; i < n; i++) {839    for (let j = 0; j < n - i - 1; j++) {840      if (data[j] > data[j + 1]) {841        [data[j], data[j + 1]] = [data[j + 1], data[j]];842      }843    }844  }845  return data;846}847 848module.exports = { bubbleSort };849console.log(bubbleSort([70, 17, 36, 51, -30, 34, 86, 47]));","Bubble sort on int data, variable named 'data', 8 elements."
85077,Node.js,Sorting Algorithm,intermediate,Sort a 8-element array of ints in ascending order using bubble sort.,"function bubbleSort(list1) {851  const n = list1.length;852  for (let i = 0; i < n; i++) {853    for (let j = 0; j < n - i - 1; j++) {854      if (list1[j] > list1[j + 1]) {855        [list1[j], list1[j + 1]] = [list1[j + 1], list1[j]];856      }857    }858  }859  return list1;860}861 862module.exports = { bubbleSort };863console.log(bubbleSort([74, 88, -41, -33, 10, 23, 8, -27]));","Bubble sort on int data, variable named 'list1', 8 elements."
86478,Node.js,Sorting Algorithm,intermediate,Sort a 8-element array of ints in ascending order using bubble sort.,"function bubbleSort(collection) {865  const n = collection.length;866  for (let i = 0; i < n; i++) {867    for (let j = 0; j < n - i - 1; j++) {868      if (collection[j] > collection[j + 1]) {869        [collection[j], collection[j + 1]] = [collection[j + 1], collection[j]];870      }871    }872  }873  return collection;874}875 876module.exports = { bubbleSort };877console.log(bubbleSort([-25, -25, 63, -8, 26, -43, -39, 33]));","Bubble sort on int data, variable named 'collection', 8 elements."
87879,Node.js,Sorting Algorithm,intermediate,Sort a 10-element array of ints in ascending order using bubble sort.,"function bubbleSort(vals) {879  const n = vals.length;880  for (let i = 0; i < n; i++) {881    for (let j = 0; j < n - i - 1; j++) {882      if (vals[j] > vals[j + 1]) {883        [vals[j], vals[j + 1]] = [vals[j + 1], vals[j]];884      }885    }886  }887  return vals;888}889 890module.exports = { bubbleSort };891console.log(bubbleSort([-36, 25, 41, 45, 60, -13, 12, 85, 55, 94]));","Bubble sort on int data, variable named 'vals', 10 elements."
89280,Node.js,Sorting Algorithm,intermediate,Sort a 10-element array of ints in ascending order using bubble sort.,"function bubbleSort(buffer) {893  const n = buffer.length;894  for (let i = 0; i < n; i++) {895    for (let j = 0; j < n - i - 1; j++) {896      if (buffer[j] > buffer[j + 1]) {897        [buffer[j], buffer[j + 1]] = [buffer[j + 1], buffer[j]];898      }899    }900  }901  return buffer;902}903 904module.exports = { bubbleSort };905console.log(bubbleSort([-4, -7, -6, -30, 47, 11, 77, 99, -14, 9]));","Bubble sort on int data, variable named 'buffer', 10 elements."
90681,Node.js,Sorting Algorithm,intermediate,Sort a 10-element array of ints in ascending order using bubble sort.,"function bubbleSort(dataset) {907  const n = dataset.length;908  for (let i = 0; i < n; i++) {909    for (let j = 0; j < n - i - 1; j++) {910      if (dataset[j] > dataset[j + 1]) {911        [dataset[j], dataset[j + 1]] = [dataset[j + 1], dataset[j]];912      }913    }914  }915  return dataset;916}917 918module.exports = { bubbleSort };919console.log(bubbleSort([15, 67, 15, -48, 69, 23, 89, -10, -32, 63]));","Bubble sort on int data, variable named 'dataset', 10 elements."
92082,Node.js,Sorting Algorithm,intermediate,Sort a 12-element array of ints in ascending order using bubble sort.,"function bubbleSort(list1) {921  const n = list1.length;922  for (let i = 0; i < n; i++) {923    for (let j = 0; j < n - i - 1; j++) {924      if (list1[j] > list1[j + 1]) {925        [list1[j], list1[j + 1]] = [list1[j + 1], list1[j]];926      }927    }928  }929  return list1;930}931 932module.exports = { bubbleSort };933console.log(bubbleSort([26, 58, 14, 66, 27, 0, 48, 73, -23, 10, 47, 96]));","Bubble sort on int data, variable named 'list1', 12 elements."
93483,Node.js,Sorting Algorithm,intermediate,Sort a 12-element array of ints in ascending order using bubble sort.,"function bubbleSort(list1) {935  const n = list1.length;936  for (let i = 0; i < n; i++) {937    for (let j = 0; j < n - i - 1; j++) {938      if (list1[j] > list1[j + 1]) {939        [list1[j], list1[j + 1]] = [list1[j + 1], list1[j]];940      }941    }942  }943  return list1;944}945 946module.exports = { bubbleSort };947console.log(bubbleSort([97, 25, 25, -45, 51, 20, -48, 94, -38, 77, 23, 8]));","Bubble sort on int data, variable named 'list1', 12 elements."
94884,Node.js,Sorting Algorithm,intermediate,Sort a 12-element array of ints in ascending order using bubble sort.,"function bubbleSort(elements) {949  const n = elements.length;950  for (let i = 0; i < n; i++) {951    for (let j = 0; j < n - i - 1; j++) {952      if (elements[j] > elements[j + 1]) {953        [elements[j], elements[j + 1]] = [elements[j + 1], elements[j]];954      }955    }956  }957  return elements;958}959 960module.exports = { bubbleSort };961console.log(bubbleSort([40, 6, -2, 14, -15, -26, -40, 29, 62, -42, 98, 43]));","Bubble sort on int data, variable named 'elements', 12 elements."
96285,Node.js,Sorting Algorithm,intermediate,Sort a 15-element array of ints in ascending order using bubble sort.,"function bubbleSort(seq) {963  const n = seq.length;964  for (let i = 0; i < n; i++) {965    for (let j = 0; j < n - i - 1; j++) {966      if (seq[j] > seq[j + 1]) {967        [seq[j], seq[j + 1]] = [seq[j + 1], seq[j]];968      }969    }970  }971  return seq;972}973 974module.exports = { bubbleSort };975console.log(bubbleSort([-17, -27, 25, 33, 56, -6, 1, -17, 88, 43, 85, 78, 19, -8, 15]));","Bubble sort on int data, variable named 'seq', 15 elements."
97686,Node.js,Sorting Algorithm,intermediate,Sort a 15-element array of ints in ascending order using bubble sort.,"function bubbleSort(entries) {977  const n = entries.length;978  for (let i = 0; i < n; i++) {979    for (let j = 0; j < n - i - 1; j++) {980      if (entries[j] > entries[j + 1]) {981        [entries[j], entries[j + 1]] = [entries[j + 1], entries[j]];982      }983    }984  }985  return entries;986}987 988module.exports = { bubbleSort };989console.log(bubbleSort([73, 25, 36, -21, 69, -31, -14, 7, 51, 92, 43, -27, 51, -47, 17]));","Bubble sort on int data, variable named 'entries', 15 elements."
99087,Node.js,Sorting Algorithm,intermediate,Sort a 15-element array of ints in ascending order using bubble sort.,"function bubbleSort(input_arr) {991  const n = input_arr.length;992  for (let i = 0; i < n; i++) {993    for (let j = 0; j < n - i - 1; j++) {994      if (input_arr[j] > input_arr[j + 1]) {995        [input_arr[j], input_arr[j + 1]] = [input_arr[j + 1], input_arr[j]];996      }997    }998  }999  return input_arr;1000}1001 1002module.exports = { bubbleSort };1003console.log(bubbleSort([-19, 66, 44, 17, 99, 47, 45, -23, 9, 70, -44, 93, 33, 6, -34]));","Bubble sort on int data, variable named 'input_arr', 15 elements."
100488,Node.js,Sorting Algorithm,intermediate,Sort a 20-element array of ints in ascending order using bubble sort.,"function bubbleSort(buffer) {1005  const n = buffer.length;1006  for (let i = 0; i < n; i++) {1007    for (let j = 0; j < n - i - 1; j++) {1008      if (buffer[j] > buffer[j + 1]) {1009        [buffer[j], buffer[j + 1]] = [buffer[j + 1], buffer[j]];1010      }1011    }1012  }1013  return buffer;1014}1015 1016module.exports = { bubbleSort };1017console.log(bubbleSort([68, 27, 54, -21, -15, -39, -41, 27, 76, -21, -26, 10, 87, -16, 49, 66, 44, 88, 57, -11]));","Bubble sort on int data, variable named 'buffer', 20 elements."
101889,Node.js,Sorting Algorithm,intermediate,Sort a 20-element array of ints in ascending order using bubble sort.,"function bubbleSort(entries) {1019  const n = entries.length;1020  for (let i = 0; i < n; i++) {1021    for (let j = 0; j < n - i - 1; j++) {1022      if (entries[j] > entries[j + 1]) {1023        [entries[j], entries[j + 1]] = [entries[j + 1], entries[j]];1024      }1025    }1026  }1027  return entries;1028}1029 1030module.exports = { bubbleSort };1031console.log(bubbleSort([56, -25, 75, 54, 21, -42, 44, 5, 63, 63, 10, 42, -25, 44, 89, 41, -35, 51, 20, -2]));","Bubble sort on int data, variable named 'entries', 20 elements."
103290,Node.js,Sorting Algorithm,intermediate,Sort a 20-element array of ints in ascending order using bubble sort.,"function bubbleSort(data) {1033  const n = data.length;1034  for (let i = 0; i < n; i++) {1035    for (let j = 0; j < n - i - 1; j++) {1036      if (data[j] > data[j + 1]) {1037        [data[j], data[j + 1]] = [data[j + 1], data[j]];1038      }1039    }1040  }1041  return data;1042}1043 1044module.exports = { bubbleSort };1045console.log(bubbleSort([66, -27, 4, -45, -38, 35, 12, -18, 94, 2, -33, 91, 3, 5, 9, 34, -13, -50, 20, -13]));","Bubble sort on int data, variable named 'data', 20 elements."
104691,Node.js,Sorting Algorithm,intermediate,Sort a 5-element array of floats in ascending order using bubble sort.,"function bubbleSort(values) {1047  const n = values.length;1048  for (let i = 0; i < n; i++) {1049    for (let j = 0; j < n - i - 1; j++) {1050      if (values[j] > values[j + 1]) {1051        [values[j], values[j + 1]] = [values[j + 1], values[j]];1052      }1053    }1054  }1055  return values;1056}1057 1058module.exports = { bubbleSort };1059console.log(bubbleSort([44.29, 75.02, -6.92, 83.11, -4.32]));","Bubble sort on float data, variable named 'values', 5 elements."
106092,Node.js,Sorting Algorithm,intermediate,Sort a 5-element array of floats in ascending order using bubble sort.,"function bubbleSort(list1) {1061  const n = list1.length;1062  for (let i = 0; i < n; i++) {1063    for (let j = 0; j < n - i - 1; j++) {1064      if (list1[j] > list1[j + 1]) {1065        [list1[j], list1[j + 1]] = [list1[j + 1], list1[j]];1066      }1067    }1068  }1069  return list1;1070}1071 1072module.exports = { bubbleSort };1073console.log(bubbleSort([74.01, 8.31, 18.53, 0.74, -13.76]));","Bubble sort on float data, variable named 'list1', 5 elements."
107493,Node.js,Sorting Algorithm,intermediate,Sort a 5-element array of floats in ascending order using bubble sort.,"function bubbleSort(seq) {1075  const n = seq.length;1076  for (let i = 0; i < n; i++) {1077    for (let j = 0; j < n - i - 1; j++) {1078      if (seq[j] > seq[j + 1]) {1079        [seq[j], seq[j + 1]] = [seq[j + 1], seq[j]];1080      }1081    }1082  }1083  return seq;1084}1085 1086module.exports = { bubbleSort };1087console.log(bubbleSort([30.09, -6.48, -12.44, 33.34, 23.08]));","Bubble sort on float data, variable named 'seq', 5 elements."
108894,Node.js,Sorting Algorithm,intermediate,Sort a 8-element array of floats in ascending order using bubble sort.,"function bubbleSort(elements) {1089  const n = elements.length;1090  for (let i = 0; i < n; i++) {1091    for (let j = 0; j < n - i - 1; j++) {1092      if (elements[j] > elements[j + 1]) {1093        [elements[j], elements[j + 1]] = [elements[j + 1], elements[j]];1094      }1095    }1096  }1097  return elements;1098}1099 1100module.exports = { bubbleSort };1101console.log(bubbleSort([-7.02, 39.96, 92.5, -14.84, 73.2, 83.17, 42.05, 34.51]));","Bubble sort on float data, variable named 'elements', 8 elements."
110295,Node.js,Sorting Algorithm,intermediate,Sort a 8-element array of floats in ascending order using bubble sort.,"function bubbleSort(arr) {1103  const n = arr.length;1104  for (let i = 0; i < n; i++) {1105    for (let j = 0; j < n - i - 1; j++) {1106      if (arr[j] > arr[j + 1]) {1107        [arr[j], arr[j + 1]] = [arr[j + 1], arr[j]];1108      }1109    }1110  }1111  return arr;1112}1113 1114module.exports = { bubbleSort };1115console.log(bubbleSort([-12.76, 37.0, 27.79, 61.65, 38.34, 88.25, -11.25, -10.39]));","Bubble sort on float data, variable named 'arr', 8 elements."
111696,Node.js,Sorting Algorithm,intermediate,Sort a 8-element array of floats in ascending order using bubble sort.,"function bubbleSort(elements) {1117  const n = elements.length;1118  for (let i = 0; i < n; i++) {1119    for (let j = 0; j < n - i - 1; j++) {1120      if (elements[j] > elements[j + 1]) {1121        [elements[j], elements[j + 1]] = [elements[j + 1], elements[j]];1122      }1123    }1124  }1125  return elements;1126}1127 1128module.exports = { bubbleSort };1129console.log(bubbleSort([-2.35, -4.98, 54.29, 49.66, 64.75, 25.33, 51.09, 15.09]));","Bubble sort on float data, variable named 'elements', 8 elements."
113097,Node.js,Sorting Algorithm,intermediate,Sort a 10-element array of floats in ascending order using bubble sort.,"function bubbleSort(input_arr) {1131  const n = input_arr.length;1132  for (let i = 0; i < n; i++) {1133    for (let j = 0; j < n - i - 1; j++) {1134      if (input_arr[j] > input_arr[j + 1]) {1135        [input_arr[j], input_arr[j + 1]] = [input_arr[j + 1], input_arr[j]];1136      }1137    }1138  }1139  return input_arr;1140}1141 1142module.exports = { bubbleSort };1143console.log(bubbleSort([52.05, -8.2, 63.51, 81.48, 57.46, 71.51, 65.78, 5.59, 33.74, 7.19]));","Bubble sort on float data, variable named 'input_arr', 10 elements."
114498,Node.js,Sorting Algorithm,intermediate,Sort a 10-element array of floats in ascending order using bubble sort.,"function bubbleSort(list1) {1145  const n = list1.length;1146  for (let i = 0; i < n; i++) {1147    for (let j = 0; j < n - i - 1; j++) {1148      if (list1[j] > list1[j + 1]) {1149        [list1[j], list1[j + 1]] = [list1[j + 1], list1[j]];1150      }1151    }1152  }1153  return list1;1154}1155 1156module.exports = { bubbleSort };1157console.log(bubbleSort([78.46, 27.45, 66.82, 17.19, 17.19, 10.33, 93.48, 61.73, 36.44, -9.14]));","Bubble sort on float data, variable named 'list1', 10 elements."
115899,Node.js,Sorting Algorithm,intermediate,Sort a 10-element array of floats in ascending order using bubble sort.,"function bubbleSort(data) {1159  const n = data.length;1160  for (let i = 0; i < n; i++) {1161    for (let j = 0; j < n - i - 1; j++) {1162      if (data[j] > data[j + 1]) {1163        [data[j], data[j + 1]] = [data[j + 1], data[j]];1164      }1165    }1166  }1167  return data;1168}1169 1170module.exports = { bubbleSort };1171console.log(bubbleSort([-8.91, -8.51, 67.92, 76.6, 46.21, 49.79, 46.83, 19.23, -5.45, 22.08]));","Bubble sort on float data, variable named 'data', 10 elements."
1172100,Node.js,Sorting Algorithm,intermediate,Sort a 12-element array of floats in ascending order using bubble sort.,"function bubbleSort(buffer) {1173  const n = buffer.length;1174  for (let i = 0; i < n; i++) {1175    for (let j = 0; j < n - i - 1; j++) {1176      if (buffer[j] > buffer[j + 1]) {1177        [buffer[j], buffer[j + 1]] = [buffer[j + 1], buffer[j]];1178      }1179    }1180  }1181  return buffer;1182}1183 1184module.exports = { bubbleSort };1185console.log(bubbleSort([91.99, 30.33, 88.99, -13.88, 14.23, 17.18, -7.67, 40.38, -1.59, 37.38, 80.83, 21.66]));","Bubble sort on float data, variable named 'buffer', 12 elements."
1186101,Node.js,Sorting Algorithm,intermediate,Sort a 12-element array of floats in ascending order using bubble sort.,"function bubbleSort(input_arr) {1187  const n = input_arr.length;1188  for (let i = 0; i < n; i++) {1189    for (let j = 0; j < n - i - 1; j++) {1190      if (input_arr[j] > input_arr[j + 1]) {1191        [input_arr[j], input_arr[j + 1]] = [input_arr[j + 1], input_arr[j]];1192      }1193    }1194  }1195  return input_arr;1196}1197 1198module.exports = { bubbleSort };1199console.log(bubbleSort([23.74, 70.75, 48.32, 76.06, 80.57, 95.97, 77.39, 53.02, 56.48, -16.88, 90.56, 78.71]));","Bubble sort on float data, variable named 'input_arr', 12 elements."
1200102,Node.js,Sorting Algorithm,intermediate,Sort a 12-element array of floats in ascending order using bubble sort.,"function bubbleSort(nums) {

Showing the first 1,200 of 27898 lines. Download the file for the rest.