2520 Shares

Is there any idea for sorting Alphabets?

Is there any idea for sorting Alphabets? Topic: Case sensitive language
May 20, 2019 / By Carry
Question: hi programmers .. I would like to know is there any method can sort alphabets ? or not ? Thaaaaaanks =D If I have a group of Alphabets "not numbers" .. e.g. F W K A D X B is there any idea ? how can i sort them ? * C++ language
Best Answer

Best Answers: Is there any idea for sorting Alphabets?

Angelle Angelle | 4 days ago
// This is a simple demo which sorts characters in a C++ string // (Standard C++ Library) (STL). #include #include #include #include using namespace std; string SortCharsInText (const string &, bool = true); int main(int argc, char *argv[]) { // Test1: your characters: string text = "FWKADXB"; cout << "Test1: " << "\n"; cout << "Original Text: " << text << endl; string sortedText = SortCharsInText (text); cout << "Sorted Text: " << sortedText << endl; cout << "\n"; text = "AxTybXLmnCopQ"; cout << "Test2: " << "\n"; cout << "Original Text : " << text << endl; cout << "Sorted Text (Case-Sensitive): " << SortCharsInText (text, true) << endl; cout << "Sorted Text (Ignore-Case) : " << SortCharsInText (text, false) << endl; system ("PAUSE"); return EXIT_SUCCESS; } // Simple sort alogorithm case-sensitive/ignore-case using Bubble-Sort algorithm: string SortCharsInText (const string& text, bool caseSensitive) { string result = text; for (unsigned i = 0; i < result.length () - 1; i++) { for (unsigned j = i + 1; j < result.length (); j++) { char ci = result [i]; char cj = result [j]; if (!caseSensitive) { ci = tolower (ci); cj = tolower (cj); } if (ci > cj) { char temp = result [i]; result [i] = result [j]; result [j] = temp; } } } return result; } ---- Be more specific and detailed. Which language? What is the nature of data? That is, sorting words in a word array, sorting collection items based on a specific field or property ...
👍 176 | 👎 4
Did you like the answer? Is there any idea for sorting Alphabets? Share with your friends

We found more questions related to the topic: Case sensitive language


Angelle Originally Answered: I have no idea what to do please help me?
It is indeed bad, how old are you exactly? I have 5 brothers and 1 sister ages ranging.. I acted out a lot and regret aspects of it now that I am a little older.. I wrote a lot of poems and short stories in JH and HS, a lot of not necessarily nice things either..When I got to the point of needing attention I would have my Mom or Dad read one and we would sit and talk etc. I got the attention I needed and felt much better afterward. Also, sometimes just having a few more friends help. I have never smoked, drank etc, and am proud of that. I advise you never to go there.. If you need help, feel free to write..-Me
Angelle Originally Answered: I have no idea what to do please help me?
Yes acting out and getting into trouble just to get attention at home is sad and wrong. You end up only hurting yourself in the long run.It is also childish behavior. You have to think about what your future might be as an adult if you get into trouble at school and how that will effect your record later. Talk to your parents and tell them you feel left out and that you need some good quality time with them too even though you understand there are 3 other siblings that also require their attention. The 4 yr old requires the most as you must keep an eye on a child so young all the time. The rest of you are more or less old enough to get along on your own more. If both your parents work and have to care for all of you besides, they only have so much time and energy to give. You will understand this when you are a parent yourself. Your dad I asume works hard all day and comes home exhausted, your mom even if she doesn't work outside your home, has to deal with 3 meals aday for all of you, everyone's laundry,house cleaning and dishes to wash, 4 kids to manage, make do chores and home work, clean your rooms. This is all exhausting in itself. The lack of attention you feel might just be because there are not enough hours in a day to accomplish everything that needs to be done for such a large family. Maybe offering to help around the house alittle will get you some private time with a parent while both of you are in the same room. Think of something possative to do, not get into trouble. You are in the growing up process, act like it and understand that the world does not revolve around just you as there are 5 other people whose needs also must be met as best as possible. Your mom and dad also need some time to themselves.
Angelle Originally Answered: I have no idea what to do please help me?
No, no. that's probably the worst thing you could do to get your parents to hate you. And also it's really bad for you aswell because you will be suspended and expelled. I think you should go the other way and keep going how you are going at school. It's better because your parents will think it's great that your doing well. If you work extra hard you might get some awards for excellence at the end of the year. I've got some awards and my mum and dad were really proud of me. It sounds like you don't get much attention off them, maybe do some more things for them around the house or something. But don't stuff up your grades to get noticed. Being good will get you more noticed. Good Luck !
Angelle Originally Answered: I have no idea what to do please help me?
I'm guessing you are the 13-year old....I totally understand what you're saying, negative attention is better than know attention, but maybe you should take some time to think, what do you're siblings do that make your parents proud, and focus on them? Try to excel at the things you do, view what they do, and try to do it better...be overall friendly/polite/nice around your housee and just show your parents you love them, you'll get attention sooner or later, and it'll be the positive kindd, I'm sure they love all you guys the same

Angelle Originally Answered: An idea of what do to after college?
Maybe you just haven't found what you're really interested in yet. I'd experiment with some new things. If you end up teaching abroad here's a site. http://eslinsider.com
Angelle Originally Answered: An idea of what do to after college?
Huuuum A Gift suggestion for school pupil, Maybe If The pupil Doesn't Have A Laptop Already You Can One For $a hundred and fifty to $250 Dollars At A Pawn Shop Or You Maybe Can Make A Nice Gift Basket With Fruits or Something.

If you have your own answer to the question case sensitive language, then you can write your own version, using the form below for an extended answer.