Tagmedium

LeetCode 6 Solution – ZigZag Conversion

L

In the LeetCode 6 – “Zigzag Conversion” problem, we are given a string s and an integer numRows. The string should be written in a zigzag pattern across numRows rows. After forming this zigzag pattern, the task is to read the characters row by row and return the resulting string. For example, with the input string "PAYPALISHIRING" and numRows = 3, the zigzag pattern looks like:...

LeetCode 5 Solution: Longest Palindromic Substring

L

LeetCode 5 Solution – The Longest Palindromic Substring: the problem asks us to find the longest substring within a given string s that reads the same forwards and backwards. A palindrome is a word or sequence of characters that is identical when reversed. For example, in the string "babad", both "bab" and "aba" are palindromic substrings, with a length of 3. Given a string s...

LeetCode #3 Solution: Longest Substring

L

LeetCode #3 Solution – Longest Substring Without Repeating Characters: The challenge is to find the length of the longest substring in a given string s that contains no repeating characters. A substring is a contiguous sequence of characters within a string. Examples: Input: s = “abcabcbb”Output: 3Explanation: The longest substring without repeating characters is...

LeetCode #2 solution: Adding two numbers

L

Problem: #2 adding two numbers LeetCode #2 solution – Adding Two Numbers: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list. You may assume the two numbers do not contain any leading zero, except...

About me

Hi, I’m Peter, a professional developer with over 25 years of experience. My journey with coding started when I was just a kid, exploring the world of programming and building my first projects out of pure curiosity and passion. Since then, I’ve turned this lifelong passion into a rewarding career, working on a wide range of projects, from small scripts to complex applications.

Now, I’m here to help others get started with coding through this blog. I know that learning to code can feel overwhelming at first, but I believe that with the right guidance, anyone can develop the skills they need to become a proficient programmer. My goal is to simplify the learning process and provide step-by-step resources that make coding accessible, fun, and practical for everyone.

Whether you’re just starting out or looking to sharpen your skills, I hope this blog serves as a valuable resource on your coding journey. Let’s dive into Python together!

Get in touch

Have any questions or feedback? Feel free to reach out—I’m always happy to help you on your coding journey!

Tags