Mastering Coding Challenges

Explore top LinkedIn content from expert professionals.

  • View profile for Andrew Ng
    Andrew Ng Andrew Ng is an Influencer

    DeepLearning.AI, AI Fund and AI Aspire

    2,593,921 followers

    Last week, I described four design patterns for AI agentic workflows that I believe will drive significant progress: Reflection, Tool use, Planning and Multi-agent collaboration. Instead of having an LLM generate its final output directly, an agentic workflow prompts the LLM multiple times, giving it opportunities to build step by step to higher-quality output. Here, I'd like to discuss Reflection. It's relatively quick to implement, and I've seen it lead to surprising performance gains. You may have had the experience of prompting ChatGPT/Claude/Gemini, receiving unsatisfactory output, delivering critical feedback to help the LLM improve its response, and then getting a better response. What if you automate the step of delivering critical feedback, so the model automatically criticizes its own output and improves its response? This is the crux of Reflection. Take the task of asking an LLM to write code. We can prompt it to generate the desired code directly to carry out some task X. Then, we can prompt it to reflect on its own output, perhaps as follows: Here’s code intended for task X: [previously generated code] Check the code carefully for correctness, style, and efficiency, and give constructive criticism for how to improve it. Sometimes this causes the LLM to spot problems and come up with constructive suggestions. Next, we can prompt the LLM with context including (i) the previously generated code and (ii) the constructive feedback, and ask it to use the feedback to rewrite the code. This can lead to a better response. Repeating the criticism/rewrite process might yield further improvements. This self-reflection process allows the LLM to spot gaps and improve its output on a variety of tasks including producing code, writing text, and answering questions. And we can go beyond self-reflection by giving the LLM tools that help evaluate its output; for example, running its code through a few unit tests to check whether it generates correct results on test cases or searching the web to double-check text output. Then it can reflect on any errors it found and come up with ideas for improvement. Further, we can implement Reflection using a multi-agent framework. I've found it convenient to create two agents, one prompted to generate good outputs and the other prompted to give constructive criticism of the first agent's output. The resulting discussion between the two agents leads to improved responses. Reflection is a relatively basic type of agentic workflow, but I've been delighted by how much it improved my applications’ results. If you’re interested in learning more about reflection, I recommend: - Self-Refine: Iterative Refinement with Self-Feedback, by Madaan et al. (2023) - Reflexion: Language Agents with Verbal Reinforcement Learning, by Shinn et al. (2023) - CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquing, by Gou et al. (2024) [Original text: https://lnkd.in/g4bTuWtU ]

  • View profile for Karan Saxena

    Software Engineer @ Google | AI & Compute Infrastructure

    162,787 followers

    Being good at DSA & CP ≠ Being good at real-world software engineering.  I’ve seen this happen so many times, someone crushes coding rounds but struggles once they’re building systems.  Why?  Because real-world engineering isn’t just about solving problems. It’s about handling scale, concurrency, memory, and reliability, all at once.  Take a basic API. Sounds easy, right?  Now add multithreading, async calls, memory leaks, and thousands of requests per second—and suddenly, it’s chaos.  This is where CS fundamentals make or break you.  Here are 25 topics to help you bridge the gap between DSA and real-world projects:  ➥Concurrency and Multithreading   1. Thread Safety – Keeping shared data safe.   2. Mutex and Locks – Controlling access to resources.   3. Semaphores – Managing resource limits.   4. Condition Variables – Synchronizing threads properly.   5. Deadlocks and Starvation – Spotting and fixing them.   6. Atomic Operations – Performing thread-safe updates.   7. Thread Pools – Efficiently managing tasks.   8. Producer-Consumer Problem – Solving real-world concurrency issues.  ➥Memory Management   9. Heap vs Stack – When to use what.   10. Memory Leaks – Finding and fixing them.   11. Garbage Collection – How it works and where it fails.   12. Object Pooling – Reusing objects to save memory.   13. Paging and Segmentation – OS-level memory handling.   14. Caching Strategies – LRU, LFU, and cache eviction.  ➥Networking and Security   15. TCP/IP Basics – How connections actually work.   16. DNS Resolution – What happens when you hit enter on a URL.   17. SSL/TLS Handshake – How secure connections are set up.   18. OAuth and Token-Based Auth – Securely handling user sessions.   19. Session Management – Preventing hijacks and managing state.   20. Firewalls and Proxies – Protecting your network.   21. Load Balancers – Distributing traffic without breaking systems.  ➥System Design and Architecture   22. Event-Driven Systems – Managing async workflows.   23. Microservices Architecture – Building distributed systems.   24. Database Indexing – Making queries faster at scale.   25. CAP Theorem – Understanding consistency, availability, and partitioning trade-offs.  DSA gets you interviews.  CS fundamentals help you build systems that work.  – P.S: I’ve been getting 10+ queries regarding DSA, HLD, and LLD daily So, to answer all, I’ve launched my One Stop Resource guide for aspiring software engineers. This guide help you with: - full roadmap of DSA, HLD, and LLD for interviews - good resources that I used included to save you time - lots of problems and case studies for DSA and system design Here’s the link: https://lnkd.in/e-detVTg (220+ students are already using it)

  • View profile for Satyam Jyottsana Gargee

    Software engineer | AI & Tech | LinkedIn Top Voice 2025 | Ex-Microsoft | walmart | 260k+ community | Featured on Time Square | Josh Talk speaker

    228,064 followers

    𝐇𝐨𝐰 𝐦𝐮𝐜𝐡 𝐃𝐒𝐀 𝐢𝐬 𝐞𝐧𝐨𝐮𝐠𝐡 𝐭𝐨 𝐜𝐫𝐚𝐜𝐤 𝐌𝐢𝐜𝐫𝐨𝐬𝐨𝐟𝐭, 𝐆𝐨𝐨𝐠𝐥𝐞 𝐨𝐫 𝐖𝐚𝐥𝐦𝐚𝐫𝐭? This is the most common DM which I get from juniors are, "Ma’am, I’ve solved 300+ questions but still can’t solve new ones. How many do I really need to do?" When I started, I had the same doubt. Some seniors said 300 questions, others said 500+ to be safe. So I rushed to hit those numbers. But here’s the truth it’s not about the count, it’s about the patterns. Once you master patterns, every new problem feels familiar. Here are the 15 patterns you must know for placements: 1. 𝐓𝐰𝐨 𝐏𝐨𝐢𝐧𝐭𝐞𝐫 𝐓𝐞𝐜𝐡𝐧𝐢𝐪𝐮𝐞 – Solve pair/relationship problems in arrays/linked lists. 2. 𝐒𝐥𝐢𝐝𝐢𝐧𝐠 𝐖𝐢𝐧𝐝𝐨𝐰 – Efficiently handle subarray/substring problems. 3. 𝐇𝐚𝐬𝐡𝐢𝐧𝐠 / 𝐅𝐫𝐞𝐪𝐮𝐞𝐧𝐜𝐲 𝐂𝐨𝐮𝐧𝐭𝐢𝐧𝐠 – O(1) lookups for counts, duplicates, mapping. 4. 𝐏𝐫𝐞𝐟𝐢𝐱 𝐒𝐮𝐦𝐬 – Answer range queries fast. 5. 𝐁𝐢𝐧𝐚𝐫𝐲 𝐒𝐞𝐚𝐫𝐜𝐡 (𝐚𝐧𝐝 𝐯𝐚𝐫𝐢𝐚𝐧𝐭𝐬) – For sorted arrays or monotonic conditions. 6. 𝐆𝐫𝐞𝐞𝐝𝐲 – Local choices that lead to global solutions. 7. 𝐃𝐲𝐧𝐚𝐦𝐢𝐜 𝐏𝐫𝐨𝐠𝐫𝐚𝐦𝐦𝐢𝐧𝐠 – Break down overlapping subproblems. 8. 𝐁𝐚𝐜𝐤𝐭𝐫𝐚𝐜𝐤𝐢𝐧𝐠 – Explore all possibilities (subsets, permutations). 9. 𝐁𝐅𝐒 – Shortest paths, level-by-level traversals. 10. 𝐃𝐅𝐒 – Explore all paths, detect cycles. 11. 𝐇𝐞𝐚𝐩 / 𝐓𝐨𝐩-𝐊 – Manage largest/smallest efficiently. 12. 𝐌𝐞𝐫𝐠𝐞 𝐈𝐧𝐭𝐞𝐫𝐯𝐚𝐥𝐬 – Handle overlaps in schedules. 13. 𝐔𝐧𝐢𝐨𝐧-𝐅𝐢𝐧𝐝 – Manage connectivity in graphs. 14. 𝐓𝐫𝐢𝐞 – Prefix-based search and storage. 15. 𝐌𝐨𝐧𝐨𝐭𝐨𝐧𝐢𝐜 𝐒𝐭𝐚𝐜𝐤 / 𝐐𝐮𝐞𝐮𝐞 – Solve next/previous greater/smaller problems. And remember, DSA is not a sprint, it is a marathon. Rejections will happen, and that is normal. But every attempt makes you sharper, and every failure teaches you a pattern in life too. #DSA #Placements #CodingInterviews #ProblemSolving #CareerAdvice

  • View profile for Akash Keshri

    AI Specialist Engineer | IIITian | Ex-UpGrad, ByteXL, HackerEarth & Teknnova | Featured in Times Square, NY & Favikon | 100K+ Community | Brand Partnerships | Helping Developers & Founders Grow with AI

    94,931 followers

    Clean code is nice. But scalable architecture? That’s what makes you irreplaceable. Early in my journey, I thought “writing clean code” was enough… Until systems scaled. Teams grew. Bugs multiplied. That’s when I discovered Design Patterns, and things started making sense. Here’s a simple breakdown that can save you hundreds of hours of confusion. 🔷 Creational Patterns: Master Object Creation These patterns handle how objects are created. Perfect when you want flexibility, reusability, and less tight coupling. 💡 Use these when: You want only one instance (Singleton) You need blueprints to build complex objects step-by-step (Builder) You want to switch object types at runtime (Factory, Abstract Factory) You want to duplicate existing objects efficiently (Prototype) 🔷 Structural Patterns: Organise the Chaos Think of this as the architecture layer. These patterns help you compose and structure code efficiently. 💡 Use these when: You’re bridging mismatched interfaces (Adapter) You want to wrap and enhance existing objects (Decorator) You need to simplify a complex system into one entry point (Facade) You’re building object trees (Composite) You want memory optimization (Flyweight) You want to control access and protection (Proxy, Bridge) 🔷 Behavioural Patterns: Handle Interactions & Responsibilities These deal with how objects interact and share responsibilities. It’s about communication, delegation, and dynamic behavior. 💡 Use these when: You want to notify multiple observers of changes (Observer) You’re navigating through collections (Iterator) You want to encapsulate operations or algorithms (Command, Strategy) You need undo/redo functionality (Memento) You need to manage state transitions (State) You’re passing tasks down a chain (Chain of Responsibility) 📌 Whether you're preparing for interviews or trying to scale your application, understanding these 3 categories is a must: 🔹 Creational → Creating Objects 🔹 Structural → Assembling Objects 🔹 Behavioral → Object Interaction & Responsibilities Mastering these gives you a mental map to write scalable, reusable, and testable code. It’s not about memorising them, it's about knowing when and why to use them. #softwareengineering #systemdesign #linkedintech #sde #connections #networking LinkedIn LinkedIn News India

  • View profile for Saumya Awasthi

    Senior Software Engineer | AI & Tech Content Creator | Featured in Times Square | Open to Collabs 🤝

    352,404 followers

    Most people don’t fail in DSA because it’s hard. They fail because they try to learn everything instead of learning the right patterns. If you’re a fresher preparing for coding interviews, stop collecting questions. Start mastering patterns. Here’s the exact roadmap I recommend 👇 1️⃣ Arrays Core patterns you must know: • Two Pointers • Sliding Window (fixed and variable) • Prefix Sum • Kadane’s Algorithm • Hashing / Frequency Map • Sorting + Greedy • Cyclic Sort • Binary Search 2️⃣ Linked Lists Core patterns: • Fast & Slow Pointer • Dummy Node • Reversal (entire list / k-group) • Merge Lists • Pointer Rewiring 3️⃣ Stack & Queue Core patterns: • Monotonic Stack • Monotonic Queue • Stack for Previous / Next Greater • Sliding Window + Deque 4️⃣ Trees & Graphs Core patterns: • DFS (pre / in / post order) • BFS (level order) • Recursion • Backtracking on Trees • Dijkstra • Topological Sort • Union Find 5️⃣ Advanced Patterns • Binary Search on Answer • Greedy • Dynamic Programming ◦ 0/1 Knapsack ◦ Unbounded Knapsack ◦ DP on Strings • Heap (Top K, Merge K) • Bit Manipulation You don’t need 1000 problems. You need clarity on these patterns. Once you understand the pattern, 10 different questions start looking the same. That’s when preparation becomes smart. If you’re preparing for placements or switching jobs, save this post and follow for more such content ❤️

  • View profile for Deeksha Pandey

    Google SWE III | Building AI & Cloud at scale | Open for Collaboration | Tech • Productivity • Fitness

    269,429 followers

    Top 5 Must-Know DSA Patterns👇🏻👇🏻 DSA problems often follow recurring patterns. Mastering these patterns can make problem-solving more efficient and help you ace coding interviews. Here’s a quick breakdown: 1. Sliding Window • Use Case: Solves problems involving contiguous subarrays or substrings. • Key Idea: Slide a window over the data to dynamically track subsets. • Examples: • Maximum sum of subarray of size k. • Longest substring without repeating characters. 2. Two Pointers • Use Case: Optimizes array problems involving pairs or triplets of elements. • Key Idea: Use two pointers to traverse from opposite ends or incrementally. • Examples: • Pair with target sum in a sorted array. • Trapping rainwater problem. 3. Binary Search • Use Case: Efficiently solves problems with sorted data or requiring optimization. • Key Idea: Repeatedly halve the search space to narrow down the solution. • Examples: • Find an element in a sorted array. • Search in a rotated sorted array. 4. Dynamic Programming (DP) • Use Case: Handles problems with overlapping subproblems and optimal substructure. • Key Idea: Build solutions iteratively using a table to store intermediate results. • Examples: • 0/1 Knapsack problem. • Longest common subsequence. 5. Backtracking • Use Case: Solves problems involving all possible combinations, subsets, or arrangements. • Key Idea: Incrementally build solutions and backtrack when a condition is not met. • Examples: • N-Queens problem. • Sudoku solver. Why These Patterns? By focusing on patterns, you can identify the right approach quickly, saving time and improving efficiency in problem-solving.

  • View profile for Dr. Brindha Jeyaraman

    Founder & CEO, Aethryx | Fractional Leader in Enterprise AI Engineering, Ops & Governance | Doctorate in Temporal Knowledge Graphs | Architecting Production-Grade AI | Ex-Google, MAS, A*STAR | Top 50 Asia Women in Tech

    20,698 followers

    One of the persistent challenges in using large language models (LLMs) is getting them to follow instructions reliably — especially when the instructions are subtle or domain-specific. DeepMind’s latest research introduces Symbol Tuning, a simple yet powerful fine-tuning method that significantly improves an LLM’s ability to follow symbolic prompts (e.g., bullet points, XML, Markdown, or code-like instructions) in zero-shot and few-shot settings. https://lnkd.in/gzKDdHQ2 Why this matters: 🔹 Improves instruction following in GPT-class models 🔹 Works with tiny amounts of data (just 100K tokens!) 🔹 Boosts performance in math, code, and reasoning-heavy tasks 🔹 Enhances models' ability to generalize across symbolic formats This has massive implications for building enterprise agents, RAG pipelines, and developer copilots that need high-precision, structured interaction with users or data. A great reminder: sometimes, small, well-targeted innovations create massive gains. #LLM #InContextLearning #SymbolTuning #PromptEngineering #DeepMind #GenAI #AIResearch #InstructionFollowing #EnterpriseAI #DeveloperTools

  • View profile for Himanshu Kumar

    Building India’s Best AI Job Search Platform | LinkedIn Growth for Forbes 30u30, YC Founder & Investor | I Build Your Cult-Like Personal Brands | Exceptional Content that brings B2B SAAS Growth & Conversions

    280,423 followers

    I analyzed the top 50 coding interview questions, and they all boil down to these 18 patterns. People ask me how to crack technical interviews without spending years on LeetCode. My secret? I don't memorize solutions. People ask how I identify the right approach for a brand new problem instantly. My secret? I look for the underlying pattern, not the specific question. But the truth is... There is no secret. Just pure Pattern Recognition. To master DSA, you have to stop treating every problem as unique. You need to map them to these 18 fundamental branches. Here is the technical breakdown to get you started: 1. Optimization & Pointers - Two Pointers: Essential for sorted arrays and linked lists. Use this to detect cycles (Floyd's algorithm), remove elements, or find target pairs in O(N) time. - Sliding Window: The standard for subarray problems. Perfect for calculating running averages, finding the longest substring under constraints, or optimization within a linear data structure. - Intervals: When dealing with time ranges or overlaps, use Merge Intervals or Catalan logic. 2. Search & Traversal - Binary Search: Beyond finding numbers. Use on rotated sorted arrays or to find "first/last occurrence" boundaries in O(log N). - Tree Traversal: Master the recursion. Know when to use Level-order (BFS) vs. Pre/In/Post-order (DFS) for tasks like serialization or finding the Lowest Common Ancestor. - Graph Traversal: Solves island counting, cycle detection, and topological sorting. 3. Complex Structures & Logic - Heaps: The most efficient way to handle "Top K" elements, scheduling tasks, or finding medians in a data stream. - Tries: The go-to design pattern for autocomplete systems, spell checkers, and prefix searches. - Backtracking: For when you need all possibilities. Used in generating permutations, N-Queens, and Sudoku solvers. 4. The Heavy Hitters - Dynamic Programming (DP): For overlapping subproblems. Includes 1D/2D arrays, Longest Common Subsequence (LCS), and the Knapsack problem. - Graph Optimization (Union Find): Critical for network connectivity. Uses Disjoint Set Union and MST algorithms like Kruskal’s or Prim’s. Want to be a software engineer? Stop memorizing. Start recognizing. Remember, seeing the pattern is 90% of the solution. The code is just syntax. Which of these patterns do you find most difficult to implement? ♻️ Repost to help a connection ace their technical interview.

  • View profile for Andreas Horn

    VP AI + Growth | Lecturer, Speaker, Advisor

    253,716 followers

    𝗖𝗮𝗻 𝗟𝗟𝗠𝘀 𝘄𝗿𝗶𝘁𝗲 𝗯𝗲𝘁𝘁𝗲𝗿 𝗰𝗼𝗱𝗲 𝗶𝗳 𝘆𝗼𝘂 𝗸𝗲𝗲𝗽 𝗮𝘀𝗸𝗶𝗻𝗴 𝘁𝗵𝗲𝗺 𝘁𝗼 “𝗪𝗥𝗜𝗧𝗘 𝗕𝗘𝗧𝗧𝗘𝗥 𝗖𝗢𝗗𝗘"? 💡 𝗧𝗵𝗲 𝘀𝗵𝗼𝗿𝘁 𝗮𝗻𝘀𝘄𝗲𝗿: 𝗬𝗘𝗦! Interesting experiment by Max Woolf. He gave Claude 3.5 Sonnet a Python challenge:   Generate 1 million random integers and find the smallest and largest numbers with a digit sum of 30. The goal? Optimize the code over multiple iterations 𝗯𝘆 𝘀𝗶𝗺𝗽𝗹𝘆 𝗮𝘀𝗸𝗶𝗻𝗴 𝗶𝘁 𝘁𝗼 “𝘄𝗿𝗶𝘁𝗲 𝗯𝗲𝘁𝘁𝗲𝗿 𝗰𝗼𝗱𝗲.”  𝗥𝗲𝘀𝘂𝗹𝘁𝘀: 1️⃣ Initial Implementation: Basic, functional, but slow (657ms).   2️⃣ Optimized Iteration: Precomputes digit sums, adds parallelism → 2.7x faster.  3️⃣ Enterprise Overengineering: Added multiprocessing, rich metrics, and JIT optimization → 100x faster! 𝗜𝗻𝘀𝗶𝗴𝗵𝘁𝘀:   - Iterative prompting works! Performance improved significantly with each iteration of "write better code".   - LLMs introduce unique optimizations (e.g., vectorization, JIT compilation), but also subtle bugs that require human review.   - Over time, the LLM started adding unnecessary “enterprise” features — a comical form of “going cosmic” for code. 𝗧𝗮𝗸𝗲𝗮𝘄𝗮𝘆:   LLMs can significantly improve code performance with simple prompts—but they’re not perfect. The experiment showed that while LLMs can suggest great optimizations, they also miss the mark or add unnecessary complexity without clear guidance. This is where human oversight comes in. Subtle errors? Misaligned logic? That’s why code specifications and test-driven development are critical when using LLMs. So, next time you’re stuck, just try: “𝘄𝗿𝗶𝘁𝗲 𝗯𝗲𝘁𝘁𝗲𝗿 𝗰𝗼𝗱𝗲.” You might be surprised at what it delivers. 😜 Here is the experiment: https://lnkd.in/d4gBsk-y

  • View profile for Zubin Pratap

    DevRel Engineering Leader (Ex Google) // Recovering Lawyer

    22,070 followers

    Coding Portfolios are like resumes. Most of them look the same and it’s very hard to tell if the candidate is any good from a “vanilla” portfolio. However, a half finished project that is trying to solve a real problem is far more interesting and persuasive than another front end “about me” project with fancy CSS. So if you want to become a professional coder, stop focusing on ‘filling up the portfolio’. That is “window dressing”. Instead focus on building usable things that address a real-life use case.  You don’t need many.  One or two “real” projects is enough to showcase how you think, and how you build solutions to ambiguous problems. I know there’s lots of suggestions on HOW to find projects.  And most suffer from one problem – they look at other examples and copy them.  Consequence?  Everything starts to look the same and you dont stand out in the job market. And again, your focus shifts to window dressing rather than learning how to use the tool (code) to solve real life problems. Here’s how I learn a new technology. I start with Why. Learn WHY I’d use it, not just WHAT it does.  Why helps us understand WHEN we should choose to use it. Then I zoom out and find real life things that can be represented by that “tool”. Learning for loops? Why would you ever need to loop over something? Oh…when you want to go through a list of things.  WHY would you want to do that?  Maybe to find one or more things in that list. To extract. To validate. To check. To update. Ok what lists do I encounter everyday that ARE NOT the obvious ones. ( Yeah - no shopping lists and TODO lists) How about lists of: 🗓 Birthdays? 💹 Investments? 💼 Jobs you would like? 🌴 Trees in the park? 🎼 Songs that last only 1 week on the charts? 💻 APIs that return other lists? As you start to think like this you will start to think about how you’d define these objects and what data you would need to store and retrieve and process. Now you’re starting to think like a coder. You’re starting to understand all the times you would want to loop over a list. This way, as you dig deeper you will learn the tools, but most importantly you will learn HOW to use them. And each little micro project from your real life becomes a project for your portfolio that is different, unique to your experience and which you are PERSONALLY connected to. That will help a lot more than just building the same portfolio projects everyone does. 👉 One tip: don’t think of projects as “products” or “startup ideas”. That’s too grandiose and overwhelming.  Small micro projects are better to learn a new technology, because each technology was designed and created to solve a specific class of problems.  Understand those classes of problems … not just the tech. Learn how the tool solves that class of problems. Repeat. #careerchange #softwarengineer

Explore categories