What do you want to save?
Add Code snippet
New code examples
-
Other 2021-08-28 05:17:02
word frequency analysis c program
#include <stdbool.h>#include <stdio.h>#include <glib.h> typedef struct word_count_tag { const char* word; size_t count;} word_count; int compare_word_count(const void* p1, const void* p2) { const word_count* w1 = p1; ... Add solution -
Java 2021-08-27 13:45:01
Mergesort parallelization using Spark
import random import time from pyspark import SparkContext def execute_merge_sort(generated_list): start_time = time.time() sorted_list = merge_sort(generated_list) elapsed = time.time() - start_time print('Simple merge sort: %f sec' % el... Add solution -
TypeScript 2021-08-27 11:57:02
Given the participants' score sheet for your University Sports Day, you are required to find the runner-up score. You are given scores. Store them in a list and find the score of the runner-up.
price=[10,20,4,5,4,6,46,43,4,64,65,8,45,55,558,15,5,4,6,5,255,5] price.sort() price.reverse() max=price[0] sec_max=price[1] print(price) print(f"the max is {max}, runner up is {sec_max}") Add solution -
C# 2021-08-26 11:05:03
unity3d sort list
// listVariable = The list of objects/vars etc. // 'delegate' command - aka callback // a / b - the values to compare // N.B. possible return values are 1, 0 and -1. The .compare method // can be used on multiple var types to ease sorting, e.g. int, floa... Add solution
Best helpers
Ranking is empty