What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-18 06:21:03
sort and remove duplicates list python
myList = sorted(set(myList)) Add solution -
Python 2021-09-18 02:16:03
binäre suche algorithmus python programmieren
## searching function def search_element(sorted_arr, n, element): ## array index for iteration i = 0 ## variables to track the search area ## initializing them with start and end indexes start = 0 end = n - 1 ## iterating over the array while i... Add solution -
Other 2021-09-17 12:26:03
collection.sort time complexity
t array. It is well-suited to merging two or more sorted arrays: simply concatenate the arrays and sort the resulting array. The implementation was adapted from Tim Peters's list sort for Python ( TimSort). It uses techiques from Peter McIlroy's "Op... Add solution -
Shell/Bash 2021-09-16 15:12:01
bash count duplicate lines in a file
# Basic syntax: sort input_file | uniq -d # Sort the file first because uniq requires a sorted file to work # Note, uniq -d only prints one instance of lines that have duplicates # Use, uniq -c to count the number of duplicates in the file Add solution -
Python 2021-09-16 06:10:03
c to python code converter
import sys def mergesort_2ndstep(l, r): len_l = len(l) len_r = len(r) # initializing a list of length zero sorted_array = [] i,j = 0,0 while i < len_l: num1 = l[i] for x in range(j,len_r): num2 = r[x] if num2 < num1 : sorted_arr... Add solution -
Java 2021-09-16 05:56:02
collection types in java
LIST: Can store duplicate values, Keeps the insertion order. It allows multiple null values, Also we can read a certain value by index. - ArrayList not syncronized, array based class - LinkedList not synchronized, doubly linked - Vect... Add solution