由买买提看人间百态

topics

全部话题 - 话题: sorts
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
I****k
发帖数: 35
1
来自主题: Programming版 - A STL sorting algorithm problem
In STL, Sort algorithm take two iterator parameters, can we pass two
points to begin/end of an array to Sort algorithm in STL? why?
w**q
发帖数: 3
2
来自主题: Programming版 - sort algorithm
Implement an algorithm to sort a linked list. Why did you pick the method
you did? Now do it in O(n) time.
how to get O(n)???
The famous sort algorithms are all O(nlog(n))
thanks a lto!
a********r
发帖数: 58
3
来自主题: Programming版 - underlying sort algorithm for SET in STL?
but what's the built-in sorting algorithm for the sorted set if have? thanks
!
a********r
发帖数: 58
4
来自主题: Programming版 - underlying sort algorithm for SET in STL?
but what's the built-in sorting algorithm for the sorted set if have? thanks
!
d***q
发帖数: 1119
5
merge sort usually is useful when dealing with a large dataset which is
unable to be loaded into memory at once..
G******n
发帖数: 749
6
来自主题: Programming版 - 什么时候该用什么sort算法
什么时候用 merge sort
什么时候用 quick sort
H******e
发帖数: 4682
7
来自主题: Programming版 - How to Sort XML Records in Visual Basic?
Hi, How to Sort XML Records in Visual Basic?
LZ编程为菜鸟级别, 请求immediate帮助, codes越详细越好, 可以酬谢上百包子。
Here I want to sort this xml file using the element .
My sample xml:
Code:




11/11/2003
Robust



11/10/2003
Robust1



12/11/2003
Robust3
阅读全帖
u***l
发帖数: 51
8
【 以下文字转载自 JobHunting 讨论区 】
发信人: until (there there), 信区: JobHunting
标 题: Leetcode上面的"Search in rotated sorted array II"
发信站: BBS 未名空间站 (Tue Nov 11 18:08:22 2014, 美东)
最优解时间复杂度是 O(n) 吗?
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).
可能有重复值
h**********c
发帖数: 4120
9
java 的quick sort 用的是dual pivot qs,记得怎么有100多行,除非你预先知道考试
题,否则很难没有bug就重复。
而且这次问quick sort,下次问dirkstra
p******r
发帖数: 122
10
如何让python dictionary sorting 的速度变得很快?
要sort 一些 python dictionary , 找出 value 最大的key, 一个 dictionary 的长度
大概有 300,000 。 然后发现速度奇慢。真的不是一点的慢。
代码用的这个:
max(stats.iteritems(), key=operator.itemgetter(1))[0]
问一下怎样能 speed up?
f*******h
发帖数: 1269
11
来自主题: Unix版 - How to sort email address?
How about sort from right to left?
I mean first sort by edu, com, then by university name, then by deptname.
Like:
yahoo.com
cs.mit.edu
ee.mit.edu
cs.purdue.edu
...
f********h
发帖数: 149
12
来自主题: Unix版 - How to do that using "sort" command?
sort -k1,1 -k3,3 -k2,2
info sort for more information
M*****n
发帖数: 16729
13
来自主题: Biology版 - 问个FACS cell sorting的问题
i found online that the lysate needs to be pre-filtered with 70um mesh
before sorting.
if the aggregates are smaller than 70um (say 60um), is it possible to sort?

fine
V********n
发帖数: 305
14
来自主题: Biology版 - cell sorting 问题求助
1) 也许和Sorting无关,消化细胞这步就可能导致很高的细胞死亡。消化后重新培养
试试。
2) NaN3这个浓度肯定能杀细胞了
3) Sorting时候染色的抗体也可能诱导细胞死亡
O***n
发帖数: 13127
15
来自主题: Biology版 - cell sorting 问题求助
do not use your staining buffer with nan3 if you want to sort cells, just
use pbs with 5% fcs or HBSS with 5% fcs; large volume wash once. sort cells
into tube with fcs

plate
Ca2+
d****d
发帖数: 155
16
来自主题: Biology版 - cell sorting 问题求助
同意,staining buffer 不加NaN3,提高FBS浓度到5%。
另外,collection tube里面加上0.5-1ml FCS 或者 culture medium,直接把cell
sorting 到里面。
staining和sorting之后很多细胞死亡挺正常的。
l**********1
发帖数: 5204
17
来自主题: Biology版 - sort vectors
Please try
同主题阅读:C#里有sort多维数组的东东么?
[版面:窗口里的风景][首篇作者:midnightfire] ,
2003年11月12日
[回复]
[ 2 ]
发信人: Cklein (Calvin Klein), 信区: DotNet
标 题: Re: C#里有sort多维数组的东东么?
发信站: Unknown Space - 未名空间 (Thu Nov 13 10:49:10 2003) WWW-POST
Implement IComparable.

http://www.mitbbs.com/article_t1/DotNet/3396902_3396903_1.html
more details please go to
//www.e800.com.cn/articles/2011/0822/493921.shtml
5
a*****x
发帖数: 901
18
来自主题: Biology版 - sort vectors
depending on your rules. For example, you can sort by the length of vectors,
a1 = 1^2 + 1^2 + 1^2 + 1^2 + 4^2, etc. You can also look for their spatial
distribution. We have many software for high-content screenings that can do
it. It's not sorting though

5
k*********r
发帖数: 758
19
【 以下文字转载自 Science 讨论区,原文如下 】
发信人: kingforever (蛋糕屎), 信区: Science
标 题: Anybody tried sorting algorithm from NR?
发信站: The unknown SPACE (Mon Apr 22 21:03:33 2002) WWW-POST
i tried sort2(n, a, b), which sorts a while re-arranging b. doesn't seem to
work. anybody else has the same problem?
e*****u
发帖数: 67
20
去面試:
被問到how to sort a very long list?
(好像還不能佔用太多Memory)...
我的回答是: 把這個long list 截斷成幾段, 分別在並行運算中同時分別sort。
然後讀出每截的第一個元素, 比較,打印出最小值;再讀出下一個, 比較, 打印出
下一個最小值。。。
(請勿見笑,非計算機major)
不知答的對不對?
謝謝!
s*********e
发帖数: 1051
21
来自主题: Statistics版 - 怎么用SAS sort 50G的data
none of the above provides any actionable solution.
you should try to index the table before sorting to reduce the demand for
resources.
by the way, did you add "sortsize = max" in the sort procedure?
s*******2
发帖数: 791
22
来自主题: Statistics版 - [提问]怎样sort这个dataset?
在我看来“用一个新的变量来标记outcome(0=A,1=B,2=C之类)”,如果就是“0=A,1=B
,2=C”,那么sort by“这三个变量”和直接sort by test outcome是一样的。我可能
没有理解你的意思,可否展开说一下,或者列出你的code?
谢谢。:)
s*******f
发帖数: 148
23
来自主题: Statistics版 - [提问]怎样sort这个dataset?
Try this~ It should work well no matter you have 18 or 16 obs.
DATA temp;
SET test;
BY input outcome;
IF FIRST.outcome THEN n=1;
ELSE n+1;
RUN;
PROC SORT DATA=temp OUT=sorted(DROP=n);
BY input n outcome;
RUN;
b*********e
发帖数: 29
24
来自主题: Statistics版 - [提问]怎样sort这个dataset?
data Test;
input input $ outcome $ @@;
datalines;
A 0 A 0 A 0
A 1 A 1 A 1
A 2 A 2 A 2
B 0 B 0 B 0
B 1 B 1 B 1
B 2 B 2 B 2
;
run;
proc sort data=test;
by input outcome;
run;
data test2; set test;
input class @@;
cards;
1 2 3 1 2 3
1 2 3 1 2 3
1 2 3 1 2 3
;
run;
proc sort data = test2;
by input class;
run;
我忘了如何把一个dataset中的三个变量中的两个存到另外一个dataset中了。
可以考虑用sql.
r********e
发帖数: 1686
25
how to avoid changing the raw dataset when you work on proc sort?
精华区里sas programmer的一个问题,不晓得该怎么回答。
changing raw data set是指什么呐? sort了,当然顺序就变了,但是其它还会改变什
么吗?
b******e
发帖数: 23
26
来自主题: Statistics版 - 请教一个sas的sort date变量问题
需要sort一个sas dataset 的 date变量:
变量的格式是
09-Aug.-2009
11-Apr.-2009
...
直接用by...不好用(因为是character?初用sas没经验)
请问应该怎么format这个变量,然后sort呢?
能给个statement就感激了。
谢谢!!
F****3
发帖数: 1504
27
来自主题: Statistics版 - 大数据sort可以用tagsort
上次sort大数据,很多热心人在这里帮忙。真是感激!
问题在问题解决了,是用这个:
PROC SORT DATA=SAS-data-set-name TAGSORT;
专门用来处理大型数据的。
c*****l
发帖数: 297
28
Do someone think it is feasible to sort a matrix (1M rows x 100 columns) for
each row in GPU? We keeping the repeating sorting every day and want to
know whether the performance could be improved to 10X or 20X faster (
Currently we just bought a server with 8 GPU K40).
l*******m
发帖数: 1096
29
please refer https://solarianprogrammer.com/2013/02/04/sorting-data-in-
parallel-cpu-gpu/
In my opinion, cpu should be fast enough for the size if the sort alg and
implementation is correct. CPU-GPU data copy is a big overhead for such a
task

for
g****1
发帖数: 1398
30
【 以下文字转载自 Military 讨论区 】
发信人: ghost1 (ghost), 信区: Military
标 题: 被坦克轧断双腿的方政重返天安門,sort of
发信站: BBS 未名空间站 (Sat Jun 2 22:57:01 2012, 美东)
http://www.youtube.com/watch?v=uzyhg70e6PA
g**1
发帖数: 10330
31
http://www.huffingtonpost.com/2013/08/31/sarah-palin-syria_n_38
Former Alaska Gov. Sarah Palin (R) weighed in on the situation in Syria,
attacking President Barack Obama and saying he should "let Allah sort it out
."
r**********g
发帖数: 22734
32
单机单cpu条件下最快,并行的话merge sort
s*********o
发帖数: 409
33
来自主题: Military版 - 问一个sorting numerical array的问题
范围是0-1之间,dimension是一百万,所以是一个一百万个scalar的vector去sort
s*********o
发帖数: 409
34
来自主题: Military版 - 问一个sorting numerical array的问题
我的sorting的是0-1之间的概率,不是整数啊,是不是我没理解你的code的意思,小白
一个不好意思
d*********o
发帖数: 6388
35
来自主题: Military版 - 福西: I am sort of exhausted
https://twitter.com/ScienceInsider/status/1241912988996698114
ScienceInsider @ScienceInsider
NEW: Tony Fauci talks with @sciencecohen today: "Well, I'm sort of exhausted
. But other than that, I'm good. I mean, I'm not, to my knowledge,
coronavirus infected. To my knowledge, I haven't been fired."
h*********i
发帖数: 2605
36
我记得以前有人讨论过。一种方法是merge sort, maintain a heap,用时O(n^2logn)
,还有更快的方法么?
h*********i
发帖数: 2605
37
一共n*n个数字,怎么可能O(N)时间完成呢。
假设你说的是O(n^2),虽然行列都sort好了,但是:
a1 a2
b1 b2
我们还是不知道b1和a2的相对大小
所以每次要从n行里找出最大的(用heap),用O(logn)时间。所以总共应该是O(n^
2logn)。

remaining matrix.
b***e
发帖数: 1419
38
来自主题: JobHunting版 - 变相的merge sort
这个直接从两头merge不就行了吗. 你不是已经知道是变相的merge sort了吗?

value
s*****r
发帖数: 773
39
来自主题: JobHunting版 - 什么是Quick Enneagram Sorting Test
不知道什么时候申请了一个公司, 今天发个email过来, 说要做The Quick Enneagram
Sorting Test and The Type Attitude Sorter. 简称QUEST-TAS.
这都是啥啊? 做的好做不好影响大么?
l**s
发帖数: 50
40
quick sort nlogn
w**********8
发帖数: 121
41
Given three sorted arrays, A, B, C, each of length n (assume odd), with all
3n elements distinct, find the median of the 3n elements.
O(n) time is easy to do. Is there an O(logn) time algorithm?
r****c
发帖数: 2585
42
basic idea, for three sorted arrays of A_1, A_2, A_3 (arbitratry length), (
assume you already know the smallest n_1 numbers and largest n_2 number),
find the longest one and choose the medium, say K in A_1, then find K's
position in all other two. Now you know K's position in all 3n, if it is <
3n/2 then the mediam then update to exclude all numbers smaller than K in
three arrays, and update n_1 = n_1 + all numbers smaller than K. recursion
then
so every time, you reduce the size at least by 5/
m******9
发帖数: 968
43
他说的是对的.
用log(m+n)找median可以看看这个帖子:
http://geeksforgeeks.org/?p=2105
意思就是, 你要取2组sub array, 使得它们的元素总个数是2k, 此时当你找到median时
,自然就是
kth min了. 对2个sorted array找median in log(m+n), 可以参考一下上面那个连接
t**n
发帖数: 272
44
来自主题: JobHunting版 - sort 10T 的数字,怎么设计实现?
external sort吧。。。
w******0
发帖数: 43
45
来自主题: JobHunting版 - write a c++ code for rotated sorted array
guys,
I have write a C++ code for rotated sorted array, help me to check which
part need optimize
{7,8,9,10,11,12,1,2,3,4,5,6};
int CQuesionts::BinarySearch2(void)
{
/*
the array like
7 8 9 10 11 12 1 2 3 4 5 6, search x
*/
int x = 2;
int len = 12;
int data[]= {7,8,9,10,11,12,1,2,3,4,5,6};
int start = 0;
int end = 11;
int mid = 0;
int find = 0;
std::cout << "find " << x << std::endl;
for(int i =0 ; i < log((double)len) +1; ++i)
{
mi
C*Y
发帖数: 736
46
say, 10 elements, or 100 elements? how many comparisons it performs?
Just found this: http://stackoverflow.com/questions/2748749/fast-algorithm-implementation-to-sort-very-small-set
I*********g
发帖数: 93
47
来自主题: JobHunting版 - 请教一个关于sort的问题
merge sort 可以用于链表吧。其他两个不太容易
y*c
发帖数: 904
48
来自主题: JobHunting版 - 一个stack怎么sort

这个是对的,然后在写一个recursive的insert, which maintains order. The
structure is similar to this sort.
a*d
发帖数: 47
49
来自主题: JobHunting版 - Search in a sorted, rotated list
Given a sorted list of N integers that has been rotated an unknown number of
positions, e.g., 15 36 1 7 12 13 14
design an algorithm to determine if a given integer is in the list
s*****n
发帖数: 956
50
开始问怎么计算这颗树有多少个节点。 这个就是简单递归。
后来问怎么把它存到一个sorted array.
void storeIntoSortedArray(Node* root, int* p)
{
//允许就在里面给 p allocate memory
}
怎么弄啊?有没有遍历一遍就能存好的方法?
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)