🚀 Leveling Up with LeetCode 75 Day #13 – Two problems, two lessons in simulation 🟡 Easy: Number of Recent Calls (933) Task: Count requests in the last 3000 ms. Insight: A queue models the sliding window perfectly. Practiced both idiomatic Kotlin (ArrayDeque) and manual array-based solutions for interview prep. Why it matters: Teaches how to maintain dynamic windows efficiently. 🟡 Medium: Dota2 Senate (649) Task: Simulate banning between Radiant and Dire senators until one party wins. Insight: Two queues track indices; smaller index acts first. Simulation continues until one queue empties. Why it matters: Shows how queues can model turn-based processes and dynamic elimination. ✨ Key Learning Queue → sliding windows and simulations. Simulation problems often reduce to “model the process with the right data structure.” 💡 My takeaway: Queues aren’t just for BFS — they’re powerful for modeling time and turn-based dynamics. #LeetCode #CodingInterview #ProblemSolving #Kotlin #DataStructures #Algorithms
Nandan Gogari’s Post
More Relevant Posts
-
Day 20 of #30DaysOfLeetCode Solved LeetCode Problem #56 – Merge Intervals using C. Problem: Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals and return the non-overlapping intervals that cover all the intervals in the input. Approach I used: Sorting + Merging • First sorted the intervals based on the starting time • Compared each interval with the previous one • If they overlapped → merged them into a single interval • If not → stored it as a new interval • Repeated the process until all intervals were processed Performance: • Runtime: 3 ms • Memory: 18.84 MB What I learned today: • Better understanding of interval-based problems • How sorting helps simplify complex problems • Handling 2D arrays efficiently in C • Getting more confident with medium-level questions #LeetCode #DSA #Algorithms #Sorting #Intervals #CProgramming #ProblemSolving
To view or add a comment, sign in
-
-
Day 149/365 – DSA Challenge 🚀 Solved Unique Paths II on LeetCode today. 🔹 Problem: A robot is placed at the top-left corner of a grid. It can only move right or down, but some cells contain obstacles (1). Find the total number of unique paths to reach the bottom-right corner while avoiding obstacles. 🔹 Approach Used: Dynamic Programming (DP) Steps followed: 1️⃣ Create a DP table where dp[i][j] represents the number of ways to reach cell (i, j). 2️⃣ Initialize the starting cell (dp[0][0] = 1) if it's not blocked. 3️⃣ If a cell has an obstacle, set dp[i][j] = 0. 4️⃣ Otherwise, [ dp[i][j] = dp[i-1][j] + dp[i][j-1] ] 5️⃣ Fill the table row by row. 🔹 Key Idea: Each cell can only be reached from the top or left, unless it's blocked. 🔹 Time Complexity: O(m × n) 🔹 Space Complexity: O(m × n) (can be optimized to O(n)) 💻 Language: C++ This problem builds on Unique Paths by introducing constraints, making it a classic Dynamic Programming grid problem. #Day149 #365DaysOfCode #DSA #LeetCode #DynamicProgramming #GridProblems #CodingChallenge #Cpp
To view or add a comment, sign in
-
-
100 LeetCode Problems: Pattern Recognition Over Problem Count Hit 100 LeetCode submissions. The breakthrough wasn't volume — it was realizing most problems are variations of ~15 core patterns. What Actually Changed: Early problems felt unique. Now I see combinations of known techniques. Two pointers, sliding windows, HashMaps aren't isolated tricks — they're building blocks that compose. "New" problems become: identify 2-3 familiar patterns, combine them, execute. The Real Skill: Decomposition. "Longest substring without repeats" = variable sliding window + HashSet. "3Sum" = sorted array + n iterations of two pointers. Honest Take: Grinding works not because you memorize solutions, but because repetition builds pattern recognition instincts. You stop asking "how do I solve this?" and start asking "which patterns apply here?" 100 down. Goal isn't 1000 problems — it's deeply understanding the patterns that make 900 of them variations on these 100. #LeetCode #PatternRecognition #CodingInterview #100Problems #AlgorithmDesign #SoftwareEngineering
To view or add a comment, sign in
-
-
Day 27 : Complex Numbers & Code Debugging 💡 Today’s live practical session in Alpha Plus 7.0 was all about testing our Object-Oriented Programming logic and sharpening our analytical skills. Today’s Checklist: ✅ Complex Number Operations: Built the OOP logic to dynamically calculate the sum, difference, and product of complex numbers. ✅ Spotting the Bug: Hunted down hidden syntax and logical errors in pre-written code snippets. ✅ Predicting the Output: Tested my understanding of memory and execution flow by predicting outputs without running the code. #OOPs #Debugging #JavaDeveloper #ProblemSolving #100DaysOfCode #ApnaCollege #SoftwareEngineering
To view or add a comment, sign in
-
-
🚀 Day 180 of #200DaysOfCoding Today I solved “Special Positions in a Binary Matrix” on LeetCode. 🧠 Problem Idea: We are given a binary matrix and need to count positions where the value is 1 and all other elements in the same row and column are 0. Such positions are called special positions. 💡 Approach: Instead of checking the entire row and column every time, we can optimize by: • Counting the number of 1s in each row • Counting the number of 1s in each column • A cell (i, j) is special if: mat[i][j] == 1 rowCount[i] == 1 colCount[j] == 1 This reduces unnecessary checks and keeps the solution efficient. ⏱ Time Complexity: O(m × n) 📦 Space Complexity: O(m + n) 💻 Language Used: C++ Consistency is the real key. Every day of problem solving improves logical thinking and problem-solving ability. Just 20 more days to complete the #200DaysOfCoding challenge! 💪 #leetcode #codingchallenge #programming #cpp #datastructures #algorithms #softwaredevelopment
To view or add a comment, sign in
-
-
𝗕𝘂𝗶𝗹𝗱𝗶𝗻𝗴 𝗔𝗜 𝗮𝗴𝗲𝗻𝘁 𝘁𝗲𝗮𝗺𝘀 𝘀𝗵𝗼𝘂𝗹𝗱𝗻’𝘁 𝘁𝗮𝗸𝗲 𝟭,𝟬𝟬𝟬+ 𝗹𝗶𝗻𝗲𝘀 𝗼𝗳 𝗣𝘆𝘁𝗵𝗼𝗻. But right now, it does. You write config. Debug connections. Rewrite boilerplate. Repeat for days. We built Agno Builder to fix that. 👉 Drag agents onto a canvas. 👉 Connect them into teams. 👉 Test with real chat. 👉 Export production ready code and pass it to devs Today we are shipping v1.3.0. Here’s what’s new 👉 Sign in with Google, GitHub, or Apple 👉 3 pricing tiers (free tier included, no credit card) 👉 120+ tools across 12 categories 👉 DB persistence and chat history 👉 10+ templates with coordinator + sub-agents The free tier gives you 1 workflow, 3 agents, and 5 messages/day. 𝗘𝗻𝗼𝘂𝗴𝗵 𝘁𝗼 𝗯𝘂𝗶𝗹𝗱 𝘀𝗼𝗺𝗲𝘁𝗵𝗶𝗻𝗴 𝗿𝗲𝗮𝗹 𝗯𝗲𝗳𝗼𝗿𝗲 𝘆𝗼𝘂 𝘀𝗽𝗲𝗻𝗱 𝗮 𝗱𝗼𝗹𝗹𝗮𝗿. Watch the full 2-min walkthrough below. What’s the first agent workflow you would build? agnobuilder[.]com #AIAgents #BuildInPublic #AgnoBuilder #Python #NoCode
To view or add a comment, sign in
-
Transform your operations with an AI-powered solution that bridges unstructured documents to structured data. Simple, easy to use and extensible with an Application Programming Interface (API) that simplifies document processing and integration. Learn More: https://xerox.bz/3Mxhjdf
To view or add a comment, sign in
-
NEW on the DevSwarm blog: Why worktrees aren't enough. Git worktrees solved the hardest technical problem in parallel AI coding: isolation. But a worktree gives you a folder on disk. It doesn't give you your IDE, your extensions, your debugger, or any of the context that makes reviewing AI-generated code fast instead of painful. Opening a separate VS Code window per worktree? Five identical windows, same color scheme, same layout. You'll run a command in the wrong one within twenty minutes. DevSwarm 2.0 embeds a full VS Code editor inside each workspace. One keypress switches your entire view — agent terminal, file tree, editor, and diff viewer — to a different task, a different branch, and a different agent. No alt-tabbing. No guessing which window is which. Read the full breakdown: https://lnkd.in/gq6PE_p5 #DevSwarm #HiVECoding #AICoding #ParallelCoding #IDE
To view or add a comment, sign in
-
-
100 LeetCode problems later — the biggest change wasn’t coding speed. It was how problems are seen. At the start, every problem looked different. Now patterns start appearing: • Sliding windows instead of brute force • Hash maps replacing nested loops • Sorting + heaps simplifying complex logic The real lesson: problem solving is about recognizing structure. ✅ 100 problems down. 🌟 Next milestone: 300 problems and stronger pattern recognition.
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