Operation: Remove non-letters. Input: "R@1se-IT_2025". Output?
Operation: Remove non-letters. Input: "R@1se-IT_2025". Output?
Operation: Convert to prefix sums. Input: [2,1,3,2]. Output?
Operation: Convert to prefix sums. Input: [2,1,3,2]. Output?
-
-
-
-
Operation: Replace each number by its double. Input: [3,0,-2,5]. Output?
Operation: Replace each number by its double. Input: [3,0,-2,5]. Output?
-
-
-
-
Operation: Sort by last digit ascending; ties keep order. Input: [51, 24, 13, 32, 40]. Output?
Operation: Sort by last digit ascending; ties keep order. Input: [51, 24, 13, 32, 40]. Output?
-
-
-
-
Rule: double each letter (AA, BB…). “BAT” → ?
Rule: double each letter (AA, BB…). “BAT” → ?
Operation: Sort words by increasing length; ties keep original order. Input: {"on","house","a","blue"}. Output?
Operation: Sort words by increasing length; ties keep original order. Input: {"on","house","a","blue"}. Output?
-
-
-
-
Operation: Merge two lists alternately starting with A. A=[1,3,5], B=[2,4,6,8]. Output?
Operation: Merge two lists alternately starting with A. A=[1,3,5], B=[2,4,6,8]. Output?
-
-
-
-
Operation: Remove vowels (a,e,i,o,u). Input: "education". Output?
Operation: Remove vowels (a,e,i,o,u). Input: "education". Output?
Rule: keep only vowels in order. “MANAGEMENT” → ?
Rule: keep only vowels in order. “MANAGEMENT” → ?
Operation: Sort words alphabetically. Input: {"pear","apple","grape","mango"}. Output?
Operation: Sort words alphabetically. Input: {"pear","apple","grape","mango"}. Output?
-
-
-
-
Rule: remove vowels, keep consonants. “LANGUAGE” → ?
Rule: remove vowels, keep consonants. “LANGUAGE” → ?
Operation: For each number, if odd square it, if even halve it. Input: [8,3,6,5]. Output?
Operation: For each number, if odd square it, if even halve it. Input: [8,3,6,5]. Output?
-
-
-
-
Operation: Swap case of alphabets. Input: "aBcD1$". Output?
Operation: Swap case of alphabets. Input: "aBcD1$". Output?
Operation: Transpose a 2×3 matrix. Input: [[1,2,3],[4,5,6]]. Output?
Operation: Transpose a 2×3 matrix. Input: [[1,2,3],[4,5,6]]. Output?
-
-
-
-
A stack starts empty. Do: PUSH A, PUSH B, PUSH C, POP, PUSH D. What is the stack top?
A stack starts empty. Do: PUSH A, PUSH B, PUSH C, POP, PUSH D. What is the stack top?
Operation: Rotate the list right by 2. Input: [1,2,3,4,5,6]. Output?
Operation: Rotate the list right by 2. Input: [1,2,3,4,5,6]. Output?
-
-
-
-
Operation: Replace number by sum of its digits. Input: [305, 49, 1002]. Output?
Operation: Replace number by sum of its digits. Input: [305, 49, 1002]. Output?
-
-
-
-
Operation: Rotate string left by 3. Input: "ALGORITHM". Output?
Operation: Rotate string left by 3. Input: "ALGORITHM". Output?
Operation: Reverse the string. Input: "MANAGER". Output?
Operation: Reverse the string. Input: "MANAGER". Output?
Operation: Stable-partition so that even numbers come first, odds later (relative order preserved). Input: [7,4,9,2,6,5]. Output?
Operation: Stable-partition so that even numbers come first, odds later (relative order preserved). Input: [7,4,9,2,6,5]. Output?
-
-
-
-
A queue starts empty. Perform ENQ 4, ENQ 7, ENQ 2, DEQ, ENQ 5. What is the queue (front→rear)?
A queue starts empty. Perform ENQ 4, ENQ 7, ENQ 2, DEQ, ENQ 5. What is the queue (front→rear)?
-
-
-
-
Alternate letters +1, next −1. “PYTHON” → ?
Alternate letters +1, next −1. “PYTHON” → ?
Operation: Remove duplicates, keep first occurrence. Input: [4,2,4,3,2,4,5]. Output?
Operation: Remove duplicates, keep first occurrence. Input: [4,2,4,3,2,4,5]. Output?
-
-
-
-
Operation: Replace each number by 1 if odd else 0. Input: [7, 12, 3, 4, 5]. Output?
Operation: Replace each number by 1 if odd else 0. Input: [7, 12, 3, 4, 5]. Output?
-
-
-
-