Join the Peerlist 30 Days LeetCode Challenge
We are hosting a 30-day LeetCode Challenge on Peerlist! If you want to hone your problem-solving skills, join us and learn from the community.
Yogini Bende
Sep 04, 2024 • 3 min read
Job hunting season is on, and we know how much preparation goes into it. Many of us love solving LeetCode problems to enhance our problem-solving skills, improve our understanding of data structures and algorithms, and prepare for technical interviews.
That’s why we’re bringing you a 30-day LeetCode Challenge!
By dedicating just 30 minutes to an hour each day to solving LeetCode problems, you can make significant progress in a short time. But doing this alone can be challenging, so we’re adding a little accountability with this.
Let’s take this challenge together as a community. By the end of 30 days, you'll have plenty of new learnings.
Starting today, we’re launching the LeetCode Challenge—a 30-day journey for all developers who want to improve their problem-solving skills.
How It Works:
- Daily Problem Statement: Every evening, we will share one LeetCode problem statement through this blog. Your task is to solve it using any programming language of your choice!
- Post Your Submissions: Once you’ve solved the problem, post your submissions as a GitHub repository or a CodeSandbox link along with your learnings of the day on Peerlist under the context #LeetCodeChallenge .
- Learn and Share Feedback: Engage with fellow developers by sharing feedback and learning from each other.
How to Submit Your Submission?
- Open Peerlist Scroll
- Click on "Create New Post" and select #LeetCodeChallenge from the context.
- Submit your solution and learnings as a post. Include the Challenge Name and Day of the challenge. If you've added the code to GitHub, Codepen, or Figma, include those links.
- Take a screenshot and share it along with your post. You can also add gifs.
- Add any learnings from the task (optional).
- Hit post! Your submission for the day is done.
So, are you ready? For the week one, we will be focusing on arrays and strings! Let's start with an easy one. Here is your Day 1 challenge!
Challenge 1 — Two Sum
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
You can return the answer in any order.
Read detailed problem statement here.
Challenge 2 — Best Time to Buy and Sell Stock
You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock. Return the maximum profit you can achieve from this transaction. If you cannot achieve any profit, return 0.
Example:Input: prices = [7,1,5,3,6,4] Output: 5 Explanation: Buy on day 2 (price = 1) and sell on day 5 (price = 6), profit = 6-1 = 5.
Read detailed problem statement here.
Challenge 3 — Maximum Subarray
Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.
Example: Input: nums = [-2,1,-3,4,-1,2,1,-5,4] Output: 6 Explanation: [4,-1,2,1] has the largest sum = 6.
Read detailed problem statement here.
Challenge 4 — Product of Array Except Self
Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i]. The product of any prefix or suffix of nums of length 1 is guaranteed to fit in a 32-bit integer. You must write an algorithm that runs in O(n) time and without using the division operation.
Example: Input: nums = [1,2,3,4] Output: [24,12,8,6]
Read detailed problem statement here.
Let's start solving!
I’ll keep updating this article daily with new challenges. If you have any queries, questions, or suggestions, reach out to me. I’d be happy to help.
Let’s learn and build together 🚀