Day 3 — DSA with Python Solved Group Anagrams today. Yesterday was about understanding what makes two words anagrams. Today was about applying that concept at scale. Key Insight: Sorting transforms all anagrams into the same representation. "eat" → "aet" "tea" → "aet" "ate" → "aet" Same sorted key → same group. A simple hash map does the job efficiently. What stood out today: DSA isn’t about isolated problems. It’s a chain. Concepts compound. Yesterday’s understanding becomes today’s solution. That’s when learning shifts from memorizing to thinking. On to Day 4. #DSA #Python #100DaysOfCode #PlacementPrep #LearningInPublic
Solving Group Anagrams with Python DSA
More Relevant Posts
-
Day 18: Today i explored how Python handles memory efficiently using Generators 🔹 What I learned and practiced: ✔️ Generators Functions that return an iterator and produce values one at a time. Great for saving memory when working with large datasets. ✔️ yield Keyword Used to produce a value and pause the function execution. It resumes from the same point when called again, unlike a normal return. ✔️ next() Function Used to retrieve the next value from the generator. Automatically stops when no more values are left to produce. ✔️ Created a square_gen() function to generate squares of numbers one by one. Key takeaway: Generators and yield are powerful tools for writing smarter, more efficient code by only processing what we need, when we need it.and also push in github #Python #codegnan #LearningPython
To view or add a comment, sign in
-
-
#Day12 of learning Python 🐍 Today I learned about file handling in Python and how to work with files using different modes like read (r), write (w), and append (a). Also explored using the with statement (context manager) to handle files more safely and efficiently. Practiced tasks like counting words in a file, checking whether a specific word exists, and building a small function to verify if a password exists inside a file. Also revised how try–except–finally helps handle file-related errors like missing files. Working with files made me realize how Python programs can store and retrieve real data, which is an important step toward building practical applications. Day 12 complete — 88 days to go! 🚀 #Day12 #PythonLearning #FileHandling #PythonFiles #100DaysOfLearning #CodingJourney #SkillShikshya
To view or add a comment, sign in
-
𝐓𝐡𝐞 𝐨𝐧𝐞 𝐏𝐲𝐭𝐡𝐨𝐧 𝐜𝐨𝐧𝐜𝐞𝐩𝐭 𝐭𝐡𝐚𝐭 𝐜𝐡𝐚𝐧𝐠𝐞𝐝 𝐡𝐨𝐰 𝐈 𝐭𝐡𝐢𝐧𝐤 𝐚𝐛𝐨𝐮𝐭 𝐌𝐞𝐦𝐨𝐫𝐲 In Python, every value in memory has an identity called Id. And this tiny detail is the key to understanding one of Python's most important concepts: 𝐌𝐮𝐭𝐚𝐛𝐢𝐥𝐢𝐭𝐲. Here's the insight that clicked for me: 🔴 Immutable means Python creates a brand new object in memory every time you "change" a value. The old one stays untouched. The Id changes. 🟢 Mutable means Python updates the existing object in place. Same memory address. Same Id. Before this, I thought mutability was just about whether a value "can change". But now I understand it's really about whether Python touches the same memory location or creates a new one. That's a much deeper way to think about it. Still in a learning journey, but these small 𝒂𝒉𝒂 moments are what make it exciting.
To view or add a comment, sign in
-
-
Most people learn Python by staring at output. I tried something different. 👇 This is what actually happens when Python executes a basic function — step by step, visually. No theory. No slides. Just execution in real time. Still early in my journey — but this is how I'm learning. If you're learning Python too, drop a 👋 below. 🔧 Tool: pythontutor / staying.fun 🐍 Concept: Functions — how they're called, executed & returned #Python #LearningInPublic #DataAnalytics #BBA #100DaysOfCode #PythonBeginners
To view or add a comment, sign in
-
Today’s Python lesson felt like learning how to write code in a smarter, cleaner way. 🐍 Day 13 of my #30DaysOfPython journey was all about list comprehension and lambda functions, and this one felt like a nice upgrade in how I think about Python. List comprehension is a compact way to create a list from a sequence. It is also faster and cleaner than writing the same logic with a full for loop. Syntax: [expression for i in iterable if condition] Then came lambda functions — tiny anonymous functions with no name. They can take any number of arguments, but only one expression. They are useful when you need a quick function inside another function. Syntax: lambda param1, param2: expression What stood out to me today was how Python gives you more than one way to solve the same problem. You can write it the long way, or you can write it in a tighter, more elegant way when the situation calls for it. One more day, one more topic, one more step toward writing code that feels sharper and more intentional. Which one clicked faster for you: list comprehension or lambda functions? #Python #LearnPython #CodingJourney #30DaysOfPython #Programming #DeveloperJourney
To view or add a comment, sign in
-
Python tip for modern developers: If you’ve ever stumbled upon xrange() in old tutorials, here’s the truth: it’s Python 2 legacy. In Python 3, range() already behaves like xrange() — it uses lazy evaluation, meaning it doesn’t generate all values at once but creates them on demand. This makes it memory‑efficient and perfect for handling large sequences. 🚫 Forget xrange() — it’s obsolete. ✅ Embrace range() — it’s the modern, optimized way to iterate in Python. At IT Learning AI, we simplify these tricky differences so you can focus on writing clean, future‑proof code without confusion. Whether you’re just starting out or sharpening advanced skills, we’re here to help you ace your tech journey with confidence. 👉 Dive deeper into Python concepts, tutorials, and hands‑on guides at https://itlearning.ai #itlearningai #pythonprogramming #learnpython #pythontip #codesmarter #pythonbasics #pythonforbeginners #phyton3 #pythondatastructures #advancedpython #pythondevelopers #techeducation #aceyourtechjourney #learnwithai #codingjourney #developergrowth
To view or add a comment, sign in
-
-
Simple way to understand vector search in RAG I made a small Python example using SentenceTransformers + FAISS to understand how retrieval works in RAG. What happens here: A few documents are converted into embeddings Those embeddings are stored in FAISS A user question is also converted into an embedding FAISS finds the most similar document chunks This is the basic idea behind RAG: store meaning as vectors, then retrieve the most relevant context before generation Very small code, but it explains a very important concept. Text → Embedding → Similarity Search → Relevant Chunks That is why vector databases are so important in RAG systems. #RAG #FAISS #Embeddings #AIEngineering #Python #LLM Code source: https://lnkd.in/g-cm4BB2
To view or add a comment, sign in
-
-
While learning LangGraph, one small Python concept suddenly became much more important to me: TypedDict. At first, I thought it was just “type annotations for dictionaries.” Useful, sure—but nothing special. Then I started thinking about state. When multiple nodes in a workflow keep reading and updating shared data, an unstructured dict becomes chaos very quickly. - Missing keys. - Unexpected values. - Confusing debugging. TypedDict solves that by forcing structure into state. That was my takeaway: - Sometimes tools that look “optional” become essential once systems start growing. #Python #BackendDevelopment #LangGraph #AIEngineering #BuildInPublic
To view or add a comment, sign in
-
🚀 Day 21 of My Python Journey – Solved Search Insert Position! 💻✨ Today I worked on a problem that looks simple but really tests your understanding of Binary Search. 📌 Problem Statement Given a sorted array of distinct integers and a target value: Return the index if the target is found If not, return the index where it should be inserted Example: nums = [1,3,5,6] target = 2 ✅ Output: 1 🔍 My Approach I used Binary Search to solve this efficiently. Start with left and right pointers Find the middle element Compare with the target Adjust search space accordingly The interesting part is: 👉 Even if the element is not found, the left pointer ends at the correct insertion position That’s a really neat trick I learned today 💡 💡 Key Learning This problem helped me understand: ✔ Binary Search more deeply ✔ How to find insertion position without extra steps ✔ Writing clean and efficient logic ✔ Handling edge cases ⏱ Complexity Time Complexity: O(log n) Space Complexity: O(1) Small problems like this sharpen the fundamentals really well 🔥 #Python #DSA #BinarySearch
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