📌 Sunday is for Revision Revisiting the problems I’ve already solved to strengthen my understanding and retain concepts better. 🚀 Day 4 – Leveling Up Problem-Solving Same pattern. Slight twist. Better thinking. Showing up daily is the real win. 📌 Today’s Problem: Sum of Squares of N Numbers Looks similar to yesterday’s problem… But the approach needs a sharper mindset. 🔹 Approaches Explored 1️⃣ Iterative Approach (For Loop) → Adding squares one by one 2️⃣ Formula-Based Approach → Direct mathematical solution for better efficiency 💡 Key Takeaway Even small variations in problems can change how you think. ✔️ Learned how similar problems require different perspectives ✔️ Understood that formulas can optimize performance 📈 Progress Update: From understanding patterns → to applying smarter solutions Consistency is the real growth engine 🔑 #Python #ProblemSolving #100DaysOfCode #Consistency #LearningJourney #DeveloperMindset
Prakash M’s Post
More Relevant Posts
-
Hello dudes and dudettes!! 🚀 Day 17/150 — Solved LeetCode 13: Roman to Integer Today’s problem was a fun twist — not your usual numbers, but ancient ones 😄🏛️ Converting Roman numerals into integers sounds simple… until the rules start playing tricks on you. 🧠 What’s the Problem About? You’re given a Roman numeral string like: 👉 “III”, “IV”, “IX”, “MCMIV” And your job is to convert it into a normal integer. 💡 Initial Thought At first, I assumed: “Just map each symbol and keep adding.” And that works… sometimes. But then comes the twist 👇 🔥 The Catch Roman numerals don’t always follow simple addition. 👉 If a smaller value comes before a bigger value, you subtract instead of adding. Examples: IV = 5 - 1 = 4 IX = 10 - 1 = 9 That’s where things get interesting. 💥 The Breakthrough Moment Instead of overthinking, I simplified the logic to one powerful idea: Look at the next character. If the next value is bigger → subtract current Otherwise → add current That’s it. Just one small check completely solves the problem. ⚙️ How It Works Traverse the string from left to right Compare each character with the next Decide whether to add or subtract Keep updating the total Simple logic. Clean execution. 📊 Why This Problem Is Cool It mixes logic with pattern recognition Shows how a tiny condition can change the whole approach Teaches you to look ahead before deciding 😎 What I Learned Don’t assume rules are always straightforward Edge cases often define the real solution Breaking the problem into small decisions makes everything easier 🎯 Key Takeaway “Sometimes the answer isn’t in the current step… it’s in what comes next.” 🔥 Another step forward — learning to think, not just code. #LeetCode #Algorithms #ProblemSolving #CodingJourney #100DaysOfCode #Python #LearningInPublic
To view or add a comment, sign in
-
-
🚀 Day 1 — Building Problem Solving Skills I’m continuing my journey to improve problem-solving skills by staying consistent, disciplined, and accountable — one problem at a time. 🧩 Problem: • Two Sum (LeetCode #1) 📚 Topic: Arrays (Pair Traversal) 💡 Key Insight: Checking all possible pairs works, but it highlights the need for more efficient approaches as input size grows. ⚡ Approach: • Pick an element using index i • Traverse remaining elements using index j • Check if nums[i] + nums[j] == target • Return indices when condition is satisfied 🎯 Takeaway: Even simple problems help strengthen logic and introduce optimization thinking. ⏱ Complexity: Time → O(n²) Space → O(1) 💻 Sample Input: nums = [2, 7, 11, 15] target = 9 ✅ Output: [0, 1] Consistency > Perfection 💪 #DSA #LeetCode #ProblemSolving #Python #CodingJourney #LearningInPublic #Arrays #TechGrowth
To view or add a comment, sign in
-
-
🚀 Cracked “Top K Frequent Elements” with an Optimal Approach! Today I solved one of the most important interview problems on LeetCode using an efficient Bucket Sort approach (O(n)) — and got it accepted ✅ 🔍 Problem Insight: Instead of sorting (which takes O(n log n)), I used frequency as an index to directly access elements with higher occurrence. 💡 Key Learnings: How to reduce time complexity from O(n log n) → O(n) Using hashmaps (Counter) for frequency counting Applying bucket sort for optimization Writing clean and interview-ready code ⚡ Complexity Analysis: Time Complexity: O(n) (Frequency count + bucket fill + traversal) Space Complexity: O(n) (Hashmap + bucket storage) ⚡ Performance: Runtime: 10 ms 🧠 Approach Summary: Count frequency of elements Store elements in buckets based on frequency Traverse from highest frequency to get top K elements 📌 Consistency > Perfection Every problem solved is one step closer to mastering DSA. #DataStructures #Algorithms #Python #LeetCode #CodingJourney #ProblemSolving #TechGrowth #Consistency #Learning #DSA
To view or add a comment, sign in
-
-
🚀 Day 15 of DSA Grind — Sliding Window Maximum (Hard) 🔥 Today’s problem pushed my thinking to the next level — not just solving, but optimizing. 💡 Problem: Given an array, find the maximum in every sliding window of size k. ⚡ Naive Approach: Check every window → O(n * k) ❌ (Too slow) 🔥 Optimized Approach (Deque / Monotonic Queue): Maintain elements in decreasing order Remove useless elements Front always gives maximum ✅ Time Complexity: O(n) ✅ Space Complexity: O(k) 🧠 Key Learning: This problem teaches how to avoid recomputation and use data structures smartly — a must-know pattern for interviews. 📌 Example: Input: [1,2,1,0,4,2,6], k = 3 Output: [2,2,4,4,6] 💬 Big Takeaway: Don’t just solve — optimize like an engineer. Consistency > Motivation 💯 #DSA #LeetCode #SlidingWindow #Python #CodingJourney #TechInterview #100DaysOfCode #SoftwareEngineering #ProblemSolving
To view or add a comment, sign in
-
-
Day 7/60 Continuing Chapter I Continuing Topic VI - Discovering Types 2. Continuing Type Conversations We can use bool () to convert a variable into a Boolean. If the variable has content, it will become True. If it's empty or , it'l become False. Convert these variables into booleans, and check the output. 🧩Code member = "Sam" middle_name = ""' foot_size = 8.5 siblings = 0 boolean_member = bool (member) boolean middle_name = bool(middle_name) boolean_foot_size = bool (foot_size) boolean_siblings = bool (siblings) print (boolean_member) print(boolean_middle_name) print (boolean_foot_size) print (boolean_siblings) 🖥️ Output True False True False 🧠Challenge of the day: What value will be printed by the code below? 🧩Code average_score = 4.7 print (int (average_score)) 🖥️Output 4 or 5 ? #python #programming #ai #bigtech
To view or add a comment, sign in
-
Hello dudes and dudettes!! 🚀 Day 21/150 — Solved LeetCode 151: Reverse Words in a String Today’s problem was a great reminder that even something as simple as a sentence can hide a few tricky details 😄 At first glance, reversing words sounds easy… But once spaces start behaving weirdly, things get interesting. 🧠 What’s the Problem About? You’re given a string that contains words separated by spaces. Your task is to: 👉 Reverse the order of words 👉 Not the characters inside them 💡 Example Input: "the sky is blue" Output: 👉 "blue is sky the" 🔥 The Twist It’s not just about reversing words… The string might contain: Extra spaces at the beginning Extra spaces at the end Multiple spaces between words Example: " hello world " Expected Output: 👉 "world hello" So we also need to clean up the spaces while solving it. 🧠 The Thought Process Instead of overcomplicating things, I broke it down: Extract the words (ignore spaces) Reverse their order Join them back with a single space That’s it. Simple steps → clean solution. ⚙️ Why This Approach Works Splitting automatically removes extra spaces Reversing handles the order Joining ensures proper formatting No unnecessary checks. No messy conditions. 😎 Why This Problem Is Interesting It looks easy but tests your handling of edge cases Shows how built-in operations can simplify problems Reinforces the idea that clarity beats complexity 💡 What I Learned Clean input → clean output Breaking a problem into steps makes it easier Sometimes the best solution is the simplest one 🎯 Key Takeaway “Don’t fight the problem — break it down and let simple steps solve it.” 🔥 Another step forward in the journey — writing cleaner, smarter solutions. #LeetCode #Algorithms #Strings #ProblemSolving #CodingJourney #100DaysOfCode #Python #LearningInPublic
To view or add a comment, sign in
-
-
The fastest way to lose money in quantitative finance is to trust your first backtest. While building a mean reversion strategy in Python, my initial results looked very strong. At first glance, it seemed like I had identified a real source of alpha. But once I applied more rigorous testing, that view changed. I implemented walk-forward optimization using VectorBT and Zipline, enforcing strict out-of-sample evaluation. I also adjusted the rebalancing logic to better reflect realistic trading conditions instead of the idealized assumptions in the initial setup. After removing any look-ahead bias, the apparent alpha largely disappeared. That was the key realization. The model wasn’t capturing a persistent signal, it was overfitting to historical noise. If a strategy cannot hold up under walk-forward testing, it’s not predictive, it’s retrospective. The main takeaway is that the real challenge in quantitative research isn’t generating signals, but validating that they are robust enough to survive out-of-sample and in live conditions. hashtag #QuantitativeFinance #AlgorithmicTrading #Python #DataScience #RiskManagement #Backtesting
To view or add a comment, sign in
-
Hello dudes and dudettes!! 🚀 Day 20/150 — Solved LeetCode 14: Longest Common Prefix Today’s problem looked simple on the surface… but turned out to be a great exercise in thinking systematically 😄 🧠 What’s the Problem About? You’re given a list of strings, and your task is to find the longest common prefix shared among all of them. In simple terms: 👉 “What is the longest starting part that every word has in common?” 💡 Example Input: ["flower", "flow", "flight"] All words start with: 👉 "fl" But after that: "flower" → o "flow" → o "flight" → i ❌ So we stop there. 🎯 Final answer: "fl" 🔥 The Catch At first, I thought: “Let me compare strings directly.” But the real trick is how you compare them. Instead of comparing whole words, I realized: 👉 Compare character by character (column-wise) 🧠 The Breakthrough Idea Think of the words like this: f l o w e r f l o w f l i g h t Now check: Column 1 → all f ✅ Column 2 → all l ✅ Column 3 → o, o, i ❌ 👉 Stop immediately. ⚙️ Approach That Worked Take the first word as a reference Loop through each character Compare that character with all other words If any mismatch → stop Otherwise → add it to the prefix 😎 Why This Problem Is Interesting It teaches you to break problems into smaller checks Shows how powerful a simple idea (column comparison) can be Reinforces the importance of stopping early when conditions fail 💡 What I Learned Don’t overcomplicate — start with the simplest structure Comparing step-by-step can be more effective than comparing everything at once Early exit conditions can save time and improve efficiency 🎯 Key Takeaway “You don’t need to compare everything — just stop at the first mismatch.” 🔥 Another step forward in the journey — learning to think clearly and solve efficiently. #LeetCode #Algorithms #Strings #ProblemSolving #CodingJourney #100DaysOfCode #Python #LearningInPublic
To view or add a comment, sign in
-
-
🚀 From Confusion → Clarity: My Approach to “Sort the People” (LeetCode) Today I solved the Sort the People problem, and instead of jumping straight into sorting tricks, I focused on building clarity step by step 👇 🔍 My Thought Process: First, I paired each name with its corresponding height using a list (like a mini mapping). Then, I sorted this list based on height. Since the problem required descending order, I simply reversed the sorted list. Finally, I extracted only the names in the correct order. 💡 Key Learning: Sometimes, the simplest approach is the best one. Instead of overcomplicating with advanced data structures, breaking the problem into smaller transformations made it super manageable. 🧠 What this improved for me: Understanding how to use lambda for sorting Confidence in handling paired data (name + value problems) Thinking in steps rather than jumping to optimization ⚡ Code Strategy in One Line: Pair → Sort → Reverse → Extract Consistency > Speed. One problem at a time. 💪 📈 If you're also grinding DSA, keep going — progress compounds! #DSA #LeetCode #CodingJourney #Python #ProblemSolving #Consistency #TechGrowth #100DaysOfCode #WomenInTech #FutureEngineer
To view or add a comment, sign in
-
-
You spend three weeks building a strategy. The backtest is flawless. Sharpe 1.1, max drawdown 18%. You wire it up to your broker’s API. And then the live account behaves nothing like the simulation. 📉 Sound familiar? It’s the backtest to production gap and it’s one of the most expensive failure modes in systematic trading. The research environment and the execution environment were never designed to speak the same language. In this Monday’s newsletter, I’m breaking down how to solve this at the architectural level using the FinRL-X framework. We’re building a complete, production-grade modular trading pipeline in Python where the backtest and the live broker consume the exact same weight-vector contract. Zero translation layer. Zero code change between research and deployment. 📬 Read the full architectural breakdown and code walkthrough in my newsletter this Monday. Subscribe here so you don’t miss it: https://lnkd.in/dqxv_G4f #QuantitativeFinance #AlgorithmicTrading #DataScience #Python #FinRL #SystematicTrading #MachineLearning
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