Day 7 of #100DaysOfLeetCode Problem: 5. Longest Palindromic Substring Category: Strings / Two Pointers / Dynamic Programming Today’s challenge was about finding the longest palindromic substring within a given string. This problem helped me improve my understanding of string traversal and palindrome validation using substring slicing. 🧠 Key Learnings: Iterated through all possible substrings to check for palindromes. Compared each substring with its reverse to find the longest one. Reinforced the concept of two-pointer expansion and string symmetry. Understood how optimizing brute-force logic can significantly reduce time complexity in future attempts. 🎯 Takeaway: Palindrome problems are all about symmetry — once you recognize that, expanding around centers or slicing becomes much more intuitive. #LeetCode #100DaysOfCode #ProblemSolving #CodingJourney #Strings #TwoPointers #Python #AIEngineer #Consistency
Solved LeetCode 5: Longest Palindromic Substring with Two Pointers and DP
More Relevant Posts
-
Had some fun by bringing art to life with Python! I created this hypnotic pattern using the turtle library for the graphics and the colorsys library to dynamically generate that smooth color transition. It's a simple script, but it’s a great exercise in using loops and hsv_to_rgb conversion to create something visually complex. It's always so satisfying to watch the program draw it line by line. I've attached a video of the code and output. #Python #CreativeCoding #TurtleGraphics #CodeArt #Programming #Developer #Tech #Visualization
To view or add a comment, sign in
-
Day 64: Distinct Subsequences (Dynamic Programming) I'm focused on challenging algorithms on Day 64 of 100DaysOfCode with "Distinct Subsequences." The goal is to count how many unique ways a shorter string (t) can be formed by deleting characters from a longer string (s). My solution uses Dynamic Programming (DP), which is essential for this combinatorial counting problem. The DP table tracks the number of ways to form prefixes of t using prefixes of s. The key recurrence relation is: we either dont use the current character of s or, if they match, we add the ways we could form the previous prefix of t. This methodical approach correctly counts every distinct subsequence, running in O(m * n) time. #Python #DSA #Algorithms #DynamicProgramming #DP #100DaysOfCode #ProblemSolving
To view or add a comment, sign in
-
-
Day 44 of #100DaysOfCode, solving "Longest Common Subsequence (LCS)." This problem requires finding the longest sequence common to two strings, even if characters are separated. My solution uses Dynamic Programming (DP), which breaks the problem into smaller, overlapping subproblems. DP Table: I built a table (optimized to use only the previous row) to store the length of the LCS found so far. The Rule: If characters match, the LCS length increases by 1 (coming from the diagonal cell). If they don't match, the length is the maximum of the two adjacent cells. This systematic approach guarantees the optimal result, solving the problem in O(m * n) time complexity. #Python #DSA #Algorithms #DynamicProgramming #LCS #100DaysOfCode #ProblemSolving
To view or add a comment, sign in
-
-
New Wiki Guide: Build Video Capture Apps with GStreamer & OpenCV in Python Ever wanted to build a video capture application in Python? 🎥 Our latest wiki guide makes it straightforward, showing you how to harness the power of GStreamer and OpenCV! Here’s what you’ll gain from this step-by-step tutorial: * Learn to capture live video from your camera using GStreamer. * Process video frames efficiently with OpenCV. * Get a complete, runnable Python script to jumpstart your projects. Whether you're developing a surveillance system, a creative video filter, or just exploring multimedia programming, this guide is your go-to resource. Read the full guide and get the code here: https://lnkd.in/d5WW9Ugn #Python #GStreamer #OpenCV #VideoProcessing #DeveloperCommunity #TechTutorials
To view or add a comment, sign in
-
In Python, a generator function is a special type of function that uses the yield keyword instead of return to produce a sequence of values. But how do we actually code it? 🤔🧐 Episode 17: #yield shift101 IT Workshop Keep Learning, Keep Coding! 👩💻👨💻 Full Video https://lnkd.in/g4kRZfSK BOYA Noise-Cancelling Microphone https://lnkd.in/g-rWNn2Z 4-in-1 Selfie Stick Tripod https://lnkd.in/gG3C8jxS A4Tech Full HD Webcam https://lnkd.in/gTrXAARf WD Elements External Hard Drive https://lnkd.in/guxgD97C #IT #Programming #Python #Tutorial #Skills
To view or add a comment, sign in
-
How to Build a Video Capture Application Using GStreamer and OpenCV in Python Ready to build your own video capture application? 🚀 Our latest guide on the PN Wiki breaks it all down! Discover how to harness the power of GStreamer and OpenCV in Python to create a robust video capture solution. This comprehensive resource offers: ✨ A step-by-step tutorial with a complete, ready-to-use Python script. 💡 Detailed explanations of GStreamer pipelines for seamless video input. ⚙️ Practical advice on customizing camera sources, resolutions, and enhancing performance. ProventusNova, an NVIDIA Connect program member, is committed to sharing valuable technical expertise to help you innovate. Explore the full guide and elevate your video processing projects today: https://lnkd.in/d5WW9Ugn #GStreamer #OpenCV #Python #VideoCapture #NVIDIAConnect #TechTutorials #DeveloperResources
To view or add a comment, sign in
-
In Python, a generator function is a special type of function that uses the yield keyword instead of return to produce a sequence of values. But how do we actually code it? 🤔🧐 Episode 17: #yield shift101 IT Workshop Keep Learning, Keep Coding! 👩💻👨💻 Full Video https://lnkd.in/gSnC5vgJ BOYA Noise-Cancelling Microphone https://lnkd.in/g8RjyWqK 4-in-1 Selfie Stick Tripod https://lnkd.in/gDMNFes3 A4Tech Full HD Webcam https://lnkd.in/gkuPz_kQ WD Elements External Hard Drive https://lnkd.in/gCsdus2c #IT #Programming #Python #Tutorial #Skills
To view or add a comment, sign in
-
Day 13: #100DaysOfCodingChallenge 🚀 Focusing today on in-place array transformation patterns in Python, specifically replacing each element with the greatest value among those to its right. 📌 Today's Progress: 1️⃣ Replace Elements with Greatest Element on Right Side (LeetCode 1299) 👉Problem: Modify the array so each element is replaced by the greatest element to its right (final element set to -1). 👉Approach: Scanned the array from right to left, tracking the current maximum 'max_right' and updating each value in-place. Achieves O(n) time and O(1) space with a clean backwards pass. Practising these in-place update patterns helps build critical skills needed for real-world coding and interview scenarios. Thanks as always to Nandan Kumar Mishra Sir and #KRMangalamUniversity for their continuous encouragement! #DSA #100DaysOfCodingChallenge #CodingChallenge #ProblemSolving #Python #Array #InPlace #LeetCode #LearningTogether #100DaysOfCode
To view or add a comment, sign in
-
-
Created a command-line calculator in Python with persistent history tracking! Key features: Supports +, -, *, / operations Prevents division by zero Saves all calculations in History.txt Includes commands like history, clear, and exit This project helped me improve my understanding of file I/O operations, input validation, and exception handling in Python. #PythonDeveloper #FileHandling #MiniProject #LearningByDoing
To view or add a comment, sign in
-
Mastering The Art of VEX and Python Learn to code, automate, and build like a true Technical Director. In this 50+ hour deep dive, Corbin Mayne will show you how to take full control of Houdini using VEX & Python as your weapons. Build tools. Solve problems. Think like a TD. Ready to become the artist studios rely on? Enroll today and master the art of VEX and Python. https://lnkd.in/ea-wAz8r #HoudiniFX #VEX #Python #FXTD #VFXEducation #DoubleJumpAcademy
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development