Input-Output (Basic) - Intermediate-Advanced Level: problem decomposition INTERMEDIATE-ADVANCED

Strategic expert challenge ★ for input-output (basic): 20 intermediate-advanced-level problems. Worksheet 19 of 30 - Focus: problem decomposition. Develop expertise in exam preparation, competitive exams, aptitude training with step-by-step solutions. Ideal for advanced developing learners targeting advanced concepts with increasing complexity.

📝 Worksheet 19 of 30 • 20 questions • ⏱️ Estimated time: 20 minutes • 🎯 Intermediate-advanced level

What you'll learn in this worksheet:
Your progress through Input-Output (Basic)
Worksheet 19 of 30 (63% complete)

Question 1

Input: 65 98 74 54 91 40 Step 1: 40 98 74 54 91 65 Step 2: 40 54 74 98 91 65 Step 3: 40 54 65 98 91 74 What is the final sorted output in ascending order?
Numbers are arranged in ascending order (smallest to largest): 40 54 65 74 91 98

Question 2

Input: grape 5 23 fig 56 31 apple Step 1: Sorted words → apple fig grape Step 2: Sorted numbers → 5 23 31 56 Step 3: Interleave (number, word, number, word...) → 5 apple 23 fig 31 grape 56 What is the final output?
Words sorted alphabetically, numbers sorted ascending, then interleaved in pattern: number, word, number, word... → 5 apple 23 fig 31 grape 56

Question 3

Input: planet 89 galaxy 12 23 sun Step 1: Separate & sort words → galaxy planet sun Step 2: Separate & sort numbers → 12 23 89 Step 3: Alternate (word, number, word, number...) → galaxy 12 planet 23 sun 89 What is the final arrangement?
Words sorted alphabetically, numbers sorted ascending, then placed alternately starting with a word: galaxy 12 planet 23 sun 89

Question 4

Input: hello world python deed noon Step 1: Palindromic words (read same forwards/backwards): deed noon Step 2: Non-palindromic words: hello python world Step 3: Combine (palindromes first, then others, each sorted alphabetically): deed noon hello python world What is the final output?
Palindromic words first (alphabetically sorted), then non-palindromic words (alphabetically sorted): deed noon hello python world

Question 5

Input: 73 55 26 65 51 4 86 79 Step 1: Identify prime numbers: 73 79 Step 2: Identify composite numbers: 4 26 51 55 65 86 Step 3: Combine (primes first, then composites, each sorted ascending): 73 79 4 26 51 55 65 86 What is the final output?
Prime numbers first (sorted ascending), followed by composite numbers (sorted ascending): 73 79 4 26 51 55 65 86

Question 6

Input: lion horse goat elephant ant Step 1: horse lion goat elephant ant Step 2: horse goat lion elephant ant Step 3: horse goat elephant lion ant What will be the final output after complete sorting?
The words are arranged in alphabetical (dictionary) order. lion horse goat elephant ant → ant elephant goat horse lion

Question 7

Input: 36 2 93 3 38 20 48 88 Step 1: Identify prime numbers: 2 3 Step 2: Identify composite numbers: 20 36 38 48 88 93 Step 3: Combine (primes first, then composites, each sorted ascending): 2 3 20 36 38 48 88 93 What is the final output?
Prime numbers first (sorted ascending), followed by composite numbers (sorted ascending): 2 3 20 36 38 48 88 93

Question 8

Input: 32 55 34 68 74 65 37 69 Step 1: Even numbers (sorted): 32 34 68 74 Step 2: Odd numbers (sorted): 37 55 65 69 Step 3: Combine (evens then odds): 32 34 68 74 37 55 65 69 What is the final output?
Even numbers first (sorted ascending), then odd numbers (sorted ascending): 32 34 68 74 37 55 65 69

Question 9

Input: hippopotamus a bee butterfly ant Step 1: a Step 2: a ant bee Rule: Arrange words by length (shortest first), then alphabetically for same length. What is the final output?
Sorted by word length: a ant bee butterfly hippopotamus

Question 10

Input: bat hippopotamus rat butterfly bee Step 1: bat bee rat Step 2: bat bee rat butterfly Rule: Arrange words by length (shortest first), then alphabetically for same length. What is the final output?
Sorted by word length: bat bee rat butterfly hippopotamus

Question 11

Input: lion ice insect goat cat Step 1: Identify vowel-starting words: ice insect Step 2: Identify consonant-starting words: cat goat lion Step 3: Sort each group alphabetically Step 4: Combine (vowels first, then consonants): ice insect cat goat lion What is the final output?
Words starting with vowels come first (sorted alphabetically), followed by words starting with consonants (sorted alphabetically): ice insect cat goat lion

Question 12

Input: 85 27 88 91 74 29 Step 1: 27 85 88 91 74 29 Step 2: 27 29 88 91 74 85 Step 3: 27 29 74 91 88 85 What is the final sorted output in ascending order?
Numbers are arranged in ascending order (smallest to largest): 27 29 74 85 88 91

Question 13

Input: dog zebra monkey bird horse Step 1: dog monkey zebra bird horse Step 2: dog monkey bird zebra horse Step 3: dog monkey bird horse zebra What will be the final output after complete sorting?
The words are arranged in alphabetical (dictionary) order. dog zebra monkey bird horse → bird dog horse monkey zebra

Question 14

Input: 45 sun galaxy 78 planet 12 Step 1: Separate & sort words → galaxy planet sun Step 2: Separate & sort numbers → 12 45 78 Step 3: Alternate (word, number, word, number...) → galaxy 12 planet 45 sun 78 What is the final arrangement?
Words sorted alphabetically, numbers sorted ascending, then placed alternately starting with a word: galaxy 12 planet 45 sun 78

Question 15

Input: umbrella orange ball cat fish Step 1: Identify vowel-starting words: orange umbrella Step 2: Identify consonant-starting words: ball cat fish Step 3: Sort each group alphabetically Step 4: Combine (vowels first, then consonants): orange umbrella ball cat fish What is the final output?
Words starting with vowels come first (sorted alphabetically), followed by words starting with consonants (sorted alphabetically): orange umbrella ball cat fish

Question 16

Input: 38 10 40 17 54 69 Step 1: Calculate digit sums → 38(11) 10(1) 40(4) 17(8) 54(9) 69(15) Step 2: Sort by digit sum (ascending) → 10 40 17 54 38 69 What is the final sorted output?
Numbers sorted by sum of their digits (smallest sum first). If sums are equal, numbers sorted by value: 10 40 17 54 38 69

Question 17

Input: 39 65 47 33 25 30 Step 1: 25 65 47 33 39 30 Step 2: 25 30 47 33 39 65 Step 3: 25 30 33 47 39 65 What is the final sorted output in ascending order?
Numbers are arranged in ascending order (smallest to largest): 25 30 33 39 47 65

Question 18

Input: mars jupiter 67 73 neptune 42 Step 1: Separate → Words: mars jupiter neptune, Numbers: 67 73 42 Step 2: Sort numbers ascending → 42 67 73 Step 3: Sort words by length (then alphabetically) → mars jupiter neptune Step 4: Alternate (word, number, word, number...) → mars 42 jupiter 67 neptune 73 What is the final output?
Words sorted by length (shortest first, alphabetically for ties), numbers sorted ascending, then alternated: mars 42 jupiter 67 neptune 73

Question 19

Input: tiger cat fish ant dog Step 1: cat tiger fish ant dog Step 2: cat fish tiger ant dog Step 3: cat fish ant tiger dog What will be the final output after complete sorting?
The words are arranged in alphabetical (dictionary) order. tiger cat fish ant dog → ant cat dog fish tiger

Question 20

Input: fish bird ant horse goat Step 1: bird fish ant horse goat Step 2: bird ant fish horse goat Step 3: bird ant fish goat horse What will be the final output after complete sorting?
The words are arranged in alphabetical (dictionary) order. fish bird ant horse goat → ant bird fish goat horse
Previous Worksheet Next Worksheet