🚀 Day-76 of #100DaysOfCode 📊 NumPy Practice – Palindrome Array Check Today I worked on checking whether an array is a palindrome using NumPy and basic logic. 🔹 Concepts Practiced ✔ Array traversal ✔ Index comparison ✔ Logic building without shortcuts 🔹 What is a Palindrome? An array is called a palindrome if it reads the same forward and backward. 🔹 Key Learning Instead of using built-in shortcuts, I focused on building the logic manually by comparing elements from both ends. This approach helps strengthen problem-solving and interview skills. Consistency + Logic Building = Growth 🚀 #Python #Numpy #ProblemSolving #CodingChallenge #100DaysOfCode #LearnPython
NumPy Palindrome Check with Logic Building
More Relevant Posts
-
🚀 Day 37 – LeetCode Journey Today’s problem: Container With Most Water ✔️ Solved using two-pointer technique ✔️ Optimized from brute force to O(n) time complexity ✔️ Efficiently calculated maximum area 💡 Key Insight: Instead of checking all pairs, moving the pointer with the smaller height helps in maximizing the area efficiently. This reduces unnecessary comparisons and improves performance significantly. This problem strengthened my understanding of greedy approach and two-pointer strategies. Consistency + Smart Thinking = Growth 🔥💪 #LeetCode #Day37 #TwoPointers #Greedy #Python #ProblemSolving #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
Valid Parentheses: HashMap + Stack for Clean Bracket Matching Nested if-else chains for each bracket type create messy code. HashMap maps closing brackets to required opening brackets. Stack tracks unmatched openers. On closing bracket, verify stack top matches via HashMap — extensible, clean solution. HashMap Simplification: Replacing conditional chains with HashMap lookup makes code extensible — new bracket types need one dict entry, not multiple conditionals. Generalizes to any multi-case validation. Time: O(n) | Space: O(n) #Stack #HashMap #BracketMatching #CodeCleanup #Python #AlgorithmDesign #SoftwareEngineering
To view or add a comment, sign in
-
-
Valid Parentheses: HashMap + Stack for Bracket Matching Nested if-else chains checking each bracket type create messy code. The optimization: HashMap maps closing brackets to their required opening brackets. Stack tracks unmatched opening brackets. On closing bracket, verify stack top matches via HashMap lookup — clean, extensible solution. HashMap Simplification: Replacing conditional chains with HashMap lookup makes code extensible — adding new bracket types requires one dictionary entry, not multiple conditionals. This pattern applies to any multi-case validation logic. Time: O(n) | Space: O(n) #Stack #HashMap #BracketMatching #CodeCleanup #Python #AlgorithmDesign #SoftwareEngineering
To view or add a comment, sign in
-
-
🚀 Day 62 of #100DaysOfCode Solved “Remove Nth Node From End of List” 🔗 💡 Today’s focus: Two Pointer Technique (Fast & Slow pointers) Instead of calculating length, I used an efficient one-pass approach to remove the target node. 🧠 Key Learnings: Dummy node helps handle edge cases (like removing head) Fast pointer moves n steps ahead Then move both pointers until fast reaches the end Slow pointer lands just before the node to delete ⚡ Clean, efficient & optimal solution (O(n) time, O(1) space) Consistency is starting to feel powerful now 💪 #DSA #LeetCode #CodingJourney #LinkedInLearning #100DaysOfCode #Day62 #Python #ProblemSolving
To view or add a comment, sign in
-
-
🚀 Day 32 – LeetCode Journey Today’s problem: Reverse String II ✔️ Implemented in-place string reversal using two pointers ✔️ Efficiently processed the string in chunks of 2k ✔️ Optimized approach with minimal extra space 💡 Key Insight: Instead of reversing the entire string, we only reverse the first k characters in every 2k block. Using the two-pointer technique makes this both simple and efficient. This problem strengthened my understanding of string manipulation, indexing, and in-place operations. Step by step, becoming a better problem solver 🔥💪 #LeetCode #Day32 #Strings #TwoPointers #Python #ProblemSolving #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Day 10 of #100DaysOfCode Today’s problem: Two Sum 🔢 🔍 What I learned: Brute force approach using nested loops Understanding time complexity (O(n²)) Importance of optimizing using HashMap (next step 🚀) 💡 Approach: Checked every pair of elements If their sum equals the target → return indices 📊 Result: ✅ All test cases passed (63/63) ⏱️ Runtime: 1780 ms 🧠 Learned that brute force works, but it's not efficient 🔥 Key takeaway: There’s always a better way! Next step → solve this using HashMap in O(n) Consistency is building momentum 💯 #LeetCode #DSA #CodingJourney #Day10 #Python #ProblemSolving
To view or add a comment, sign in
-
-
Reorder Linked List: Split, Reverse, Merge Pattern Reordering a linked list looks tricky at first, but it becomes clean once you break it into three deterministic steps: Find the middle Reverse the second half Merge both halves alternately The key insight is: instead of trying to rearrange nodes in one pass, decompose the problem into simpler sub-problems you already know how to solve efficiently. Complexity: Time: O(n) | Space: O(1) Takeaway: Many linked list problems follow a hidden pattern: 👉 Split → Transform → Merge Once you recognize this, problems like palindrome check, reorder list, and even some cycle-based problems become much easier. #LinkedList #TwoPointers #InPlaceAlgorithms #CodingInterview #ProblemSolving #Python #SoftwareEngineering
To view or add a comment, sign in
-
-
Did you dig our latest work on enzyme inmobilization with Fernando López Gallego? We created workflows for you! Now available as a Python package and in Collab, from the great Juan C. Jiménez García https://lnkd.in/ep9QdBEa https://lnkd.in/ec2h9-6x
To view or add a comment, sign in
-
🚀 Day 33 – LeetCode Journey Today’s problem: Move Zeroes ✔️ Used two-pointer technique for in-place modification ✔️ Moved all non-zero elements forward efficiently ✔️ Maintained relative order of elements 💡 Key Insight: By keeping a pointer for non-zero elements, we can swap values in a single pass and avoid extra space — making the solution both clean and optimal. This problem improved my understanding of array manipulation and in-place algorithms. Consistency is building confidence day by day 💪🔥 #LeetCode #Day33 #Arrays #TwoPointers #Python #ProblemSolving #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
Day 3 / 100 🚀 Solved “Reverse Integer” — a problem that looks simple but actually tests how carefully you handle edge cases. At first, reversing digits feels straightforward. But the real challenge is handling 32-bit overflow without using extra space. 💡 Key learning: Before updating the result, always check if multiplying by 10 will exceed the allowed range. Core idea: rev * 10 + digit must stay within [-2³¹, 2³¹ - 1] Highlights: • Time Complexity: O(log n) • Space Complexity: O(1) • Correctly handles negative numbers and overflow This problem reinforced a critical habit: Don’t just make the logic work — validate boundary conditions. #100DaysOfCode #LeetCode #DSA #Python #ProblemSolving #CodingInterview
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