DAY 53 🚀 – Bit Manipulation + Subsets 🔥 Exploring power sets and pattern expansion 💯 Day 53 / #120DaysOfCode – LeetCode Challenge ✅ Problem Solved: • 78. Subsets 💻 Language: Python 📚 Key Learnings: • Built subsets using iterative expansion technique • Understood relation to power set (2ⁿ combinations) • Learned alternative approach via bit manipulation • Strengthened understanding of combinatorics in coding 💡 Key Insight: Each element doubles the number of subsets → include / exclude 🔥 Progress: Moving deeper into patterns used in recursion & bit manipulation 💪 🔗 LeetCode Profile: https://lnkd.in/gbeMKcv5 #LeetCode #Python #DSA #BitManipulation #Subsets #Backtracking #Consistency #120DaysOfCode
Bit Manipulation and Subsets in Python
More Relevant Posts
-
Day 35 / #120DaysOfCode – LeetCode Challenge ✅ Problem Solved: • Minimum Distance Between Equal Elements 💻 Language: Python 📚 Key Learnings: • Used HashMap (defaultdict) to store indices of elements • Learned how to track positions efficiently • Applied distance calculation between indices • Improved understanding of index-based problems • Practiced optimizing solution using O(n) approach Consistency + Practice = Progress 📈 🔗 LeetCode Profile: https://lnkd.in/gbeMKcv5 #LeetCode #Python #DSA #HashMap #Algorithms #CodingJourney #Consistency #120DaysOfCode
To view or add a comment, sign in
-
-
Day 43/100 – #100DaysOfCode 🚀 Solved LeetCode #2610 – Convert an Array Into a 2D Array With Conditions (Python). Today I practiced hashmap (frequency counting) to construct a 2D array based on given conditions. Approach: 1) Create a frequency map to count occurrences of each element. 2) Initialize an empty result list. 3) While the frequency map is not empty: 4) Create a new row. 5) Iterate through keys and add each number once to the row. 6) Decrease its frequency and remove it if it becomes zero. 7) Add the row to the result. 8) Return the final 2D array. Time Complexity: O(n) Space Complexity: O(n) Learning how frequency maps help in structuring data efficiently 💪 #LeetCode #Python #DSA #HashMap #Arrays #ProblemSolving #100DaysOfCode
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 55/100 – #100DaysOfCode 🚀 Solved LeetCode #205 – Isomorphic Strings (Python). Today I practiced hashmap (dictionary) usage to check whether two strings follow the same pattern. Approach: 1) Create two hashmaps to store character mappings in both directions. 2) Traverse both strings together using zip(). 3) Check if the current mapping is consistent in both maps. 4) If any mismatch is found, return False. 5) Otherwise, update the mappings and continue. 6) If all mappings are valid, return True. Time Complexity: O(n) Space Complexity: O(n) Understanding how bidirectional mapping ensures consistency 💪 #LeetCode #Python #DSA #HashMap #Strings #ProblemSolving #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Day [21] of #Geekstreak60 Today’s #POTD was Two Equal Sum Subarrays — a neat exercise in prefix sums, binary search, and validation logic. I solved it in Python using multiple approaches: ✅ Direct prefix sum check ✅ Hash set tracking for generalized detection ✅ Binary search on prefix array for efficient lookup Each method reinforces how different strategies can converge on the same solution, sharpening problem‑solving skills and adaptability. #Coding #Python #Geekstreak60 #ProblemSolving #DSA #GeeksforGeeks #Geekstreak2026 Problem Link : https://lnkd.in/gzdaVpnr Solution Link : https://lnkd.in/gvdHSgwR
To view or add a comment, sign in
-
-
Day 32 / #120DaysOfCode – LeetCode Challenge Today’s focus: Arrays & Majority Voting Algorithm ✅ Problem Solved: • Majority Element II 💻 Language: Python 📚 Key Learnings: • Applied Boyer-Moore Voting Algorithm (extended version) • Learned how to track two candidates for n/3 majority • Understood the importance of validation step after candidate selection • Improved ability to handle edge cases in frequency problems Consistency builds confidence 🚀 Every day = 1% better 💪 🔗 LeetCode Profile: https://lnkd.in/gbeMKcv5 #LeetCode #Python #DSA #Arrays #Algorithms #Consistency #CodingJourney #120DaysOfCode
To view or add a comment, sign in
-
-
Day 40/100 – #100DaysOfCode 🚀 Solved LeetCode #2460 – Apply Operations to an Array (Python). Today I practiced array manipulation and simulation to apply given operations and rearrange elements efficiently. Approach: 1) Traverse the array and check adjacent elements. 2) If nums[i] == nums[i + 1], double nums[i] and set nums[i + 1] to 0. 3) After processing, collect all non-zero elements into a new list. 4) Count the number of zeros to be added. 5) Append remaining zeros at the end to maintain array size. Time Complexity: O(n) Space Complexity: O(n) Learning how to simulate operations step by step 💪 #LeetCode #Python #DSA #Arrays #ProblemSolving #100DaysOfCode
To view or add a comment, sign in
-
-
From Code to Combat 💥 Who says programming can't be a little "supercharged"? I spent some time building a real-time gesture recognition tool in Python. By tracking hand coordinates and calculating the velocity of movement, I’ve managed to turn code into energy. It’s one thing to build a backend system, but seeing your logic manifest as a visual blast is a different kind of win. So you got to know an animie fan..hehehe #Python #OpenCV #DragonBallZ #CreativeCoding #MachineLearning #TechDemo
To view or add a comment, sign in
-
Day 39 / #120DaysOfCode – LeetCode Challenge ✅ Problem Solved: • Integer to Roman 💻 Language: Python 📚 Key Learnings: • Learned how to map numerical values to symbolic representations • Used greedy approach for optimal conversion • Understood importance of ordered value-symbol pairing • Practiced handling special subtraction cases (IV, IX, XL, etc.) • Improved skills in writing structured and readable logic Consistency + Logic = Growth 🚀 🔗 LeetCode Profile: https://lnkd.in/gbeMKcv5 #LeetCode #Python #DSA #Algorithms #CodingJourney #Greedy #120DaysOfCode
To view or add a comment, sign in
-
-
Python Clarity Series – Episode 25 Topic: Mutable vs Immutable Function Behavior 📌 Why did my list change after function call? def modify(lst): lst.append(100) a = [1, 2] modify(a) print(a) Output: [1, 2, 100] 👉 Lists are mutable → changes reflect outside Now: def modify(x): x = x + 10 a = 5 modify(a) print(a) Output: 5 👉 Integers are immutable → no change outside 💡 Rule: Mutable → changes persist Immutable → changes don’t This confusion causes logic errors. #PythonBasics #FunctionConcepts #StudentClarity #python #clarity
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