Quicksort列表的字符串 [英] Quicksort for list of string

查看:74
本文介绍了Quicksort列表的字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以告诉我是否输入了以下字符串:

ABC

abc

BBC


然后我怎么能获得

ABC

abc

BBC




abc

ABC

BBC

作为我的输出使用快速排序。

can any one tell me if I give the followiing string in input:
ABC
abc
BBC

then how I can get
ABC
abc
BBC
or

abc
ABC
BBC
as my output usiing quicksort.

推荐答案

4月19日13:50,aparnakakkar2 ... @ gmail.com写道:
On 19 Apr, 13:50, aparnakakkar2...@gmail.com wrote:

任何人都可以告诉我,如果我输入以下字符串:

ABC

abc

BBC


然后我怎么能获得

ABC

abc

BBC





abc

ABC

BBC

作为我的输出使用快速排序。
can any one tell me if I give the followiing string in input:
ABC
abc
BBC

then how I can get
ABC
abc
BBC

or

abc
ABC
BBC
as my output usiing quicksort.



不知道快速排序,但如果你想要排序,那么从某些输入中读取一些

的字符串数将它们存储在std :: vector中并且

对它们使用std :: sort()。不知道字符串的确切顺序但是

我猜大写字母在小写字母之前排序所以

最可能的结果是:


ABC

abc

BBC


-

Erik Wikstr?m

Don''t know about quicksort but if it''s sorting you want then given a
number of strings read from some input store them in a std::vector and
use std::sort() on them. Don''t know the exact ordering of strings but
I''d guess that capital letters are sorted before lowercase letters so
the most likely result would be:

ABC
abc
BBC

--
Erik Wikstr?m


Erik Wikstr?m写道:
Erik Wikstr?m wrote:

4月19日, 13:50,aparnakakkar2 ... @ gmail.com写道:
On 19 Apr, 13:50, aparnakakkar2...@gmail.com wrote:

>任何人都可以告诉我是否在输入中输入了以下字符串:
ABC
abc
BBC

然后我怎么得到
ABC
abc
BBC

或者

abc
ABC
BBC
作为我的输出使用快速排序。
>can any one tell me if I give the followiing string in input:
ABC
abc
BBC

then how I can get
ABC
abc
BBC

or

abc
ABC
BBC
as my output usiing quicksort.



不知道快速排序,但是如果你想要排序,那么从一些输入中读取一个

的字符串数量将它们存储在std :: vector中并且

对它们使用std :: sort()。不知道字符串的确切顺序但是

我猜大写字母在小写字母之前排序所以

最可能的结果是:


ABC

abc

BBC


Don''t know about quicksort but if it''s sorting you want then given a
number of strings read from some input store them in a std::vector and
use std::sort() on them. Don''t know the exact ordering of strings but
I''d guess that capital letters are sorted before lowercase letters so
the most likely result would be:

ABC
abc
BBC



*所有*大写字母来*之前*任何*小写的。所以,结果

*应该*


ABC

BBC

abc


V

-

请在通过电子邮件回复时删除资金''A'

我没有回复最热门的回复,请不要问

*All* capital letters come before *any* lowercase ones. So, the result
*should* be

ABC
BBC
abc

V
--
Please remove capital ''A''s when replying by e-mail
I do not respond to top-posted replies, please don''t ask


4月19日下午6:42,Victor Bazarov < v.Abaza ... @ comAcast.netwrote:
On Apr 19, 6:42 pm, "Victor Bazarov" <v.Abaza...@comAcast.netwrote:

Erik Wikstr?m写道:
Erik Wikstr?m wrote:

4月19日13:50,aparnakakkar2 ... @ gmail.com写道:
On 19 Apr, 13:50, aparnakakkar2...@gmail.com wrote:

任何人都可以告诉我是否在输入中给出了跟随字符串: br />
ABC

abc

BBC
can any one tell me if I give the followiing string in input:
ABC
abc
BBC


然后我怎么能获得

ABC

abc

BBC
then how I can get
ABC
abc
BBC



or


abc

ABC

BBC

作为我的输出使用快速排序。
abc
ABC
BBC
as my output usiing quicksort.


不知道快速排序,但是如果你想要排序,那么给出一个

从某些输入读取的字符串数将它们存储在std :: vector中,并且

对它们使用std :: sort()。不知道字符串的确切顺序但是

我猜大写字母是在小写字母之前排序所以

最可能的结果是:
Don''t know about quicksort but if it''s sorting you want then given a
number of strings read from some input store them in a std::vector and
use std::sort() on them. Don''t know the exact ordering of strings but
I''d guess that capital letters are sorted before lowercase letters so
the most likely result would be:


ABC

abc

BBC
ABC
abc
BBC



*所有*大写字母都在* any * lowercase之前。所以,结果

*应该*


ABC

BBC

abc


V

-

请在通过电子邮件回复时删除资金''A'

我没有回复最热门的回复,请不要问 - 隐藏引用的文字 -


- 显示引用的文字 -


*All* capital letters come before *any* lowercase ones. So, the result
*should* be

ABC
BBC
abc

V
--
Please remove capital ''A''s when replying by e-mail
I do not respond to top-posted replies, please don''t ask- Hide quoted text -

- Show quoted text -



但我想以这种方式只能告诉我怎么样,那个排序函数

不会给出这个结果。

but I want in that way only can you tell me how ,that sort function
will not give this result.

这篇关于Quicksort列表的字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆