Checking the order

  • 5
Hierarchy is a dictator's first tool for maintaining order and military control. We'll think about a dictatorship later. For now, let's make a list of 10 words. Let's use the keyboard to enter them. Our task is to check whether the list is ordered by increasing string length. If not, we'll display the index of the first element that violates this order.
You can't complete this task, because you're not signed in.
Comments(15)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
andy 6473Level 9 , Bangalore
14 July, 06:45
This is how they are asking you to compare 0 with 1 1 with 2 2 with 3 and so on hope this helps
andy 6473Level 9 , Bangalore
14 July, 06:39
roman explain how the output should occur
RomanLevel 41
14 July, 06:45
For input:
grandfather
grandmother
father
mother
son
daughter
cat
dog
program
car
output is 2 because:
grandfather -> in order (index 0)
grandmother -> in order (index 1)
father -> not in order (index 2)
mother
son
daughter
cat
dog
program
car
Jamie PyetteLevel 9 , Sault Ste. Marie
17 July, 04:40
Hah, respectfully, this still doesnt make sense IMO. In what way is this not ordered
Jamie PyetteLevel 9 , Sault Ste. Marie
17 July, 04:45
Nevermind, I get it now. But probably the most confusing description of a task thus far.
RomanLevel 41
17 July, 06:14
2. Determine whether the list is ordered by increasing string length.
Jamie PyetteLevel 9 , Sault Ste. Marie
18 July, 16:35
Determine whether the list is ordered by (the act of) increasing string length....thats how I read it, totally my fault. Determine whether the list is ordered in a pattern of the strings having increasing lengths...maybe thats too wordy.....anyway, I got er' figured so its all good.
andy 6473Level 9 , Bangalore
10 July, 16:44
can some one write the output type expected . it is very very confusing
Nickolas JohnsonLevel 8 , St. Louis
30 March, 13:36
I wrote two different sets of code that both worked and yet only one passed the test. :-/
Raj MishraLevel 9 , India
31 January, 07:28
I could not understand the meaning of question, what I need to do??
Grigore TurcanLevel 9 , Chisinau
3 January 2019, 19:46
why my code does no work ?
RomanLevel 41
4 January 2019, 06:57
If you need help, something isn't right in your code, the server won't accept your solution (even if you are 100% sure that it is correct). Describe your question/issue in the HELP section at codegym.cc/help.
arvindsidLevel 10 , Chennai
27 October 2018, 06:29
what is wrong with my solution? iam getting an error saying the index element should be displayed and not the order
RomanLevel 41
29 October 2018, 06:29
If you need help, something isn't right in your code, the server won't accept your solution (even if you are 100% sure that it is correct). Describe your question/issue in the HELP section at codegym.cc/help.
andy 6473Level 9 , Bangalore
14 July, 06:39
Explain how the output should occur