pyPython Practice LabFrom first print to final round
TOPIC 05 OF 18

Lists, Tuples, and Matrices Python practice problems

Use sequence operations and common array patterns, then move into matrix processing.

20 exercises8+ conceptsBeginner → interview context
Start this topic
WHAT YOU WILL PRACTISE

Core concepts

Calculate list sum and averageFind largest and second largestRemove list duplicates in orderRotate a list to the rightMove zeros to the endMerge two sorted listsFind a missing numberFind two-sum indexes
REUSABLE THINKING

Problem-solving patterns

  • Choose an index or value traversal, then update the collection
INTERVIEW SIGNALS

Reported company tags

AmazonMicrosoftAccentureMetaGoogle
Community-reported tags are guidance, not guarantees.
ORDERED PRACTICE

All 20 problems in this topic

Work from top to bottom to build the concept gradually.

  1. #081
    Calculate list sum and average: Daily sales

    Summarize several daily sales values.

    BeginnerPremium
  2. #082
    Calculate list sum and average: Decimal measurements

    Average measurements that contain decimals and a negative correction.

    BeginnerPremium
  3. #083
    Find largest and second largest: Contest scores

    Report the highest and second-highest distinct contest scores.

    BeginnerPremium
  4. #084
    Find largest and second largest: Negative values

    Find the two greatest distinct values in an all-negative list.

    BeginnerPremium
  5. #085
    Remove list duplicates in order: Clean survey codes

    Remove repeated response codes without rearranging the first occurrences.

    BeginnerPremium
  6. #086
    Remove list duplicates in order: Already unique

    Confirm that an already unique list is unchanged.

    BeginnerPremium
  7. #087
    Rotate a list to the right: Shift duty roster

    Rotate a five-person roster two positions to the right.

    BeginnerPremium
  8. #088
    Rotate a list to the right: Rotation larger than length

    Use modulo when the requested rotation exceeds the list length.

    BeginnerPremium
  9. #089
    Move zeros to the end: Clean sparse readings

    Move missing-value markers to the end while keeping other readings in order.

    BeginnerPremium
  10. #090
    Move zeros to the end: No zeros

    Confirm that a dense list remains unchanged.

    BeginnerPremium
  11. #091
    Merge two sorted lists: Merge rank lists

    Combine two sorted rank lists into one sorted report.

    BeginnerPremium
  12. #092
    Merge two sorted lists: Duplicates across lists

    Keep all occurrences when equal values appear in both inputs.

    BeginnerPremium
  13. #093
    Find a missing number: Missing attendance ID

    Find the absent ID among a consecutive class roster.

    BeginnerPremium
  14. #094
    Find a missing number: Missing boundary

    Find the missing final value rather than a value in the middle.

    BeginnerPremium
  15. #095
    Find two-sum indexes: Price pair

    Find zero-based indexes of two prices that exactly use a gift voucher.

    BeginnerPremium
  16. #096
    Find two-sum indexes: Pair containing a negative

    Find a target pair when one list value is negative.

    BeginnerPremium
  17. #097
    Find the maximum subarray sum: Best profit streak

    Find the largest total across a consecutive streak of daily gains and losses.

    BeginnerPremium
  18. #098
    Find the maximum subarray sum: All losses

    Return the least negative single day when every value is negative.

    BeginnerPremium
  19. #099
    Transpose a matrix: Rectangular table

    Turn a 2-by-3 table into a 3-by-2 table.

    BeginnerPremium
  20. #100
    Transpose a matrix: Single row

    Transpose a one-row matrix into a one-column result.

    BeginnerPremium