Python List Coding Practice Problems
Last Updated : 28 Jan, 2025
Improve
This article brings us a curated collection of problems on list in Python ranging from easy to hard. Practice popular problems like finding the second largest element, moving zeroes to the end, solving the trapping rainwater problem and more. Whether you're a beginner or an advanced programmer, these list problems in Python will challenge and improve your coding expertise.
List Practice Problems
Easy:
- List Traversal
- Length of The List
- Sum The List
- Decrement List Values
- Append To List
- Less Than
- Average
- Separate Even Odd
- Second Largest Element
- Third largest element
- Three Great Candidates
- Move All Zeroes To End
- Reverse Array in Groups
- Rotate Array
- Wave Array
- Plus One
- Stock Buy and Sell – One Transaction
- Repetitive Addition Of Digits
- Remove Duplicates from Sorted Array
- Alternate Positive Negative
- Array Leaders
- Missing Ranges of Numbers
- Union of Arrays with Duplicates
- Count Distinct
Medium:
- Next Permutation
- Majority Element
- Majority Element II
- Stock Buy and Sell – Multiple Transactions
- Minimize the Heights II
- Maximum Subarray Sum
- Maximum Product Subarray
- Product of Array Except Self
- Subarrays with Product Less Than K
- Split Into Three Equal Sum Segments
- Maximum Consecutive 1s After Flipping 0s
- Last Moment Before Ants Fall Out of Plank
- Transform and Sort Array
- Minimum Swaps To Group All Ones
- Minimum Moves To Equalize Array
- Maximize Distance to Closest Person
- Rearrange Array Elements by Sign
- Longest Mountain Subarray
Hard:
- Trapping Rain Water
- Maximum Circular Subarray Sum
- Smallest Missing Positive Number
- Jump Game
- Smallest Non-Representable Sum in Array
- Smallest Range Having Elements From K Lists
- Candy Distribution
- Count Subarrays with K Distinct Elements
- Next Smallest Palindrome
- Maximum Sum Among All Rotations