Founding Batch Offer · HLD · LLD · System Design at ₹799 until 30 Nov

ProgramsLogic building

Phase 4 - Level 3: Transformation

Transform arrays - reverse, rotate, swap, and create new arrays.

10 programs · open one, then the next

Start with New Array of Squares
  1. 01New Array of SquaresIntermediateCreate a separate list of squares with append. Students preserve original values, transform every element once, and compare the two displayed lists afterward.Open example →
  2. 02New Array with Only Even ElementsIntermediateBuild a new list containing only even values in Python. Students filter without altering the source and preserve the order and repetitions of matching elements.Open example →
  3. 03Replace Negatives with 0IntermediateReplace negative list entries with zero in Python. Students use indexes for in-place updates and distinguish changing an element from changing a loop variable.Open example →
  4. 04Replace Evens with 1, Odds with 0IntermediateEncode even list values as one and odd values as zero in Python. Students trace in-place index assignments and avoid confusing this rule with remainder itself.Open example →
  5. 05Swap First & Last ElementsIntermediateSwap a list's first and last elements safely. Students use a nonempty guard, negative indexing, and simultaneous assignment without overwriting either endpoint.Open example →
  6. 06Reverse ArrayIntermediateReverse a Python list by swapping symmetric positions. Students trace a half-length loop and calculate the partner index without swapping every pair twice.Open example →
  7. 07Rotate Left by 1IntermediateRotate a Python list one position left with manual shifts. Students save the first value, move remaining values safely, and wrap the saved value to the end.Open example →
  8. 08Rotate Right by 1IntermediateRotate a list one position right with manual shifts. Students preserve the last value and scan backward to avoid overwriting values that are still needed.Open example →
  9. 09Swap Alternate ElementsIntermediateSwap adjacent pairs in a Python list with a step-two loop. Students trace safe partner indexes and see why an unmatched final element stays in place.Open example →
  10. 10Copy Array ManuallyIntermediateCopy integer list elements manually with append. Students create a list container and distinguish a copied list from a second reference to the same list.Open example →