sorting tag

34 questions


1 answers
63 views
0
I'm asking for your help because I don't understand the example sentence about arranging JavaScript arrays.

<!DOCTYPE html><html> <body> <p id=demo></p> <button onclick=myFunction()>Try it</button> <script> var points = [40, 100, 1, 5, 25, 10]; document.g...

2 years ago

1 answers
74 views
0
Sorting result not output...

I was simply creating a sort selector. The five integers entered by the user are sorted by heap, bubble, and quick.t = 0print(Please enter 5 integers of your choice:\n)unsorted = []sorted = []while t ...

2 years ago

1 answers
101 views
0
I want to know how to sort the list in descending order without using the built-in function of the list.

import randoma = random.sample(range(1,100,10) #using the random module sample, random.sample(range, end value, sampling count)smallest = a[0]for i in a: if i < smallest: smallest = iA = smallestpr...

2 years ago

1 answers
155 views
0
Which one should I use to sort vectors in descending order?

Please explain which one to use when sorting vectors in descending order, which one do you prefer?std::sort(numbers.begin(), numbers.end(), std::greater<int>());std::sort(numbers.rbegin(), numbe...


1 answers
102 views
0
Is there a way to sort based on the attributes of the elements in the list?

>>> ut[<Tag: 128>, <Tag: 2008>, <Tag: <>, <Tag: actionscript>, <Tag: addresses>, <Tag: aes>, <Tag: ajax> ...]>>> ut[1].count1LWhen we hav...

2 years ago

1 answers
141 views
0
Python List Sorting in Korean and English

When sorting the Python list, English comes first, but is there a way to make Hangul come first?names = [C, AB, N, L, DA, AA, D]sorted(names)# # Output[AA, AB, C, DA, A, N, D]# # Desired Output[a, n, ...


3 answers
127 views
0
Python. I want to know how to sort words by frequency, and if they are the same frequency, I want to know how to sort words alphabetically and print them out.

start law year time joy time word family friend year tonight year law time joy work library word justice start time work president year start time president country joy familyIf you give it as an inpu...

2 years ago

1 answers
109 views
0
How do I arrange dict in key order?

{2:3, 1:89, 4:5, 3:0 ->{1:89, 2:3, 3:0, 4:5}How do I arrange it in key order?In other articles, everyone returns the tuple with the ordered value.I need a dict, not a tuple

2 years ago

1 answers
134 views
0
I'd like to sort out the list that stores sequence types

data1 = [[1,2,3], [4,5,6], [7,8,9]]data2 = [(1,2,3), (4,5,6), (7,8,9)]I'm saving lists and tuples as list elementsYou want to sort by the second item (2,5,8) in each element.In Python 3.5, the first e...

2 years ago

1 answers
69 views
0
« - 2 - »

© 2024 OneMinuteCode. All rights reserved.