Writing fast, reliable software sometimes means solving problems that have no obvious answer. Our R&D team just published a #TechTalk article documenting one of those problems: how do you make #Cython classes that are created automatically at runtime carry the right data with them, without slowing things down? The article walks through every approach they tried, why some fell short, and the solution they landed on. It also covers a subtle crash bug hiding in the final design, and how to handle it safely. 🔗 Read it here: https://lnkd.in/en4mP4cM #SoftwareEngineering #Programming
Intersec’s Post
More Relevant Posts
-
LCA - Lowest Common Ancestor of binary tree Approach: If current node is null, return null If current node is p or q, return current node Recursively search left and right If both sides return non-null → current node is LCA Otherwise → return the non-null side TC = O(n) SC = O(h) - depends on tree height (recursion stack) O(logn) - balanced tree O(n) - skewed tree #dsa #leetcode #consistency #coding #programming
To view or add a comment, sign in
-
-
Notebook to fine-tune Gemma-4 model is now live on my github repo. ❤️ The notebook walks you step by step on how to train Google's gemma-4, 2 billion parameter model on Multiple-choice Question Answering task with LoRA. We modify the model architecture to inject low rank metrices from scratch and train the model parameters. 🚀 Link to the notebook is in the comments. 🔗 #programming #coding #llm
To view or add a comment, sign in
-
-
Binary tree right side view Approach: - Keep a level variable - If level == result.size(), add current node (first node of that level) - Traverse right first, then left Time: O(n) Space: O(h) (worst: O(n), best: O(log n)) #Algorithms #DSA #LeetCode #coding #Programming
To view or add a comment, sign in
-
-
55 of #100DaysOfCode: Today I dived into LeetCode 316 (Remove Duplicate Letters). This problem is a fantastic lesson in balancing multiple constraints: maintaining unique characters while ensuring the smallest lexicographical order. The Key Insight: Using a Monotonic Stack approach. The goal isn't just to remove duplicates, but to greedily decide whether to keep a character or pop it based on whether it appears again later in the string. Stack Logic: Pop elements only if they are larger than the current character AND guaranteed to appear later. #cpp #leetcode #programming #algorithms #datastructures #codingcommunity #100daysofcode
To view or add a comment, sign in
-
-
51 of #100DaysOfCode Solved LeetCode 739 — Daily Temperatures using the Monotonic Stack approach 🔥 💡 Approach: Instead of checking every future day (which would be inefficient), I used a stack to store indices of temperatures in decreasing order. Traverse the array If the current temperature is higher than the one at the stack’s top, we’ve found the next warmer day Pop the index and calculate the difference Push the current index into the stack This ensures each element is processed only once — making it super efficient ⚡ ⏱️ Time Complexity: O(n) 📦 Space Complexity: O(n) #leetcode #coding #dsa #cpp #programming #developers #tech #interviewprep
To view or add a comment, sign in
-
-
Q. All Nodes at distance K in binary tree Approach: Do level order traversal create a function which mark parents of each nodes create a visited hash map move outwards direction every time - (towards the parent, left, right) of node at any point if distance is equal to K -- break if not then repeat for next element in queue At the end - store remaining elements of queue in vector and return TC : O(N) -- overall SC : O(N) -- overall #DSA #programming #coding #binarytree #buildinpublic #leetcode
To view or add a comment, sign in
-
-
Subtree of another tree Approach: If subRoot is null - return true If root is null - return false If values match - check isIdentical(root, subRoot) If identical - return true Else - check left and right: isSubtree(root.left, subRoot) isSubtree(root.right, subRoot) Return true if found anywhere, otherwise false TC: O(N*M) -- n =no. of nodes in root, m = no. nodes in subRoot (worst case) SC: O(h) -- height of tree ( O(N) -- skewed tree || O(logN) -- balanced tree) #coding #programming #DSA #Consistency #Leetcode #CodingJourney
To view or add a comment, sign in
-
-
🚀 Day 93 of #100DaysOfCode Challenge Today’s problem was all about identifying “Beautiful Strings” 🔢✨ A numeric string is called beautiful if: ✔️ It can be split into a sequence of increasing numbers ✔️ Each number is exactly +1 from the previous ✔️ No leading zeros allowed 💡 What I Learned Today: How to break strings into valid sequences Handling large numbers using long long Importance of string comparison vs integer operations Edge cases like: Leading zeros ❌ Single digit strings ❌ Invalid increments ❌ 🧠 Approach: Try all possible starting numbers Generate the sequence dynamically (x, x+1, x+2…) Match the built string with the original If matched → ✅ YES x Else → ❌ NO 💻 Example: 👉 Input: 91011 👉 Output: YES 9 ⚡ Key Takeaway: Sometimes brute force with smart validation is the best approach! 📅 Consistency is the real game changer. On to Day 94 💪 #Coding #Programming #CProgramming #DataStructures #ProblemSolving #100DaysOfCode #DeveloperJourney #LearningEveryday
To view or add a comment, sign in
-
Binary search tree iterator Approach: BSTIterator - push all node's left to stack next - return the top element of stack and call pushAll function again to push all node's left if node has right hasnext - return whether the stack is non-empty TC: O(1) SC: O(h) - height of bst #dsa #leetcode #binarytree #programming #coding
To view or add a comment, sign in
-
-
Invert Binary tree Approach: check if node is null or not if null return null swap left node and right ( not value complete node ) go to left (recursively) go to right (recursively) return node TC: O(N) SC:O(N)- recursive stack #DSA #programming #coding #problemSolving
To view or add a comment, sign in
-
More from this author
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