C#字符串处理 [英] c# string manupulaion

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

问题描述

给出了一串字符.查找出现最高的字符并显示该字符.
例如:输入:AEGBCNAVNEETGUPTAEDAGPE
输出:E

给我一个解决方案

A string of charaters were given. Find the highest occurance of a character and display that character.
eg.: INPUT: AEGBCNAVNEETGUPTAEDAGPE
OUTPUT: E

give me a solution

推荐答案

如果您要张贴作业,至少要使其看起来像您自己尝试做某事!

我们不做您的作业:这是有原因的.在这里,您可以考虑自己被告知的内容,并尝试理解它.也可以在那里帮助您的导师识别您的弱点,并将更多的注意力放在补救措施上.

自己尝试,或学习魔语:您想要炸薯条吗?"
If you are going to post your homework, at least try to make it look like you have attempted to do something yourself!

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, or learn the Magic Words: "Do you want fries with that?"


按照OriginalGriff的建议.

如果仍然没有任何解决方案,请在Internet上搜索,您将能够获得一些进行字母计数的算法.
尝试将算法转换为代码-我相信您最终会到达那里.
Follow OriginalGriff''s advice.

IF you still dont get any solutions, search on the internet and you will be able to get some algorithms that do a letter count.
Try converting that algorithm to code - I''m sure you will get there in the end.


我认为将来的CodeProject可能会提供一个标记,以将Question标记为不做功课". :)
I think in future CodeProject may provide a flag to mark Question as "We do not do your homework". :)


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

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