So today came across this simple problem on Stack Overflow: "How can I pair socks from a pile efficiently?" Couldn't help but share it here,A very very miniscule statement and very naive sounding problem, albeit, when you read the question completely, and read through the selected answers one by one, you will marvel at how human brain is just so good at translating problems in real world to math, and then back for easier, simpler solutions! My favorite answer was the second on, where the answer digressed that comparing human brain to CPU is an overkill, which I agree. What you think? Find the complete problem here: https://lnkd.in/gW-bJhnu #linkedinlearning #algorithms #datastructures #computersciene
Aakash Srivastav’s Post
More Relevant Posts
-
🌟 Discover the Power of Arrays in DSA with Strivers' A2Z Course! 🌟 🔍 Exploring Array Problems 🔍 🔹 Largest Element in an Array: 🔹 Second Largest Element in an Array without Sorting: 🔹 Check if the Array is Sorted: 🔹 Remove Duplicates from Sorted Array: 🔹 Left Rotate an Array by One Place: 🔹 Move Zeros to End: 🔹 Linear Search: #DataStructures #Algorithms #Arrays #StriversA2ZDSACourse #TechEducation
To view or add a comment, sign in
-
-
Read the Flash Attention paper. Really fun. The key insights from the authors is for memory bound operations like the attention, FLOPs doesn't matter, the GPU High Bandwidth Memory(HBM) access is the bottleneck. Also as a UB alum, I am really proud that Professor Atri Rudra is one of the authors. I had blog for more detailed introduction of Flash Attention if you are interested and the Numpy implementation could be found at my Github. Flash Attention paper: https://lnkd.in/g7mggiqQ My blog: https://lnkd.in/gigMn_DF Numpy implementation: https://lnkd.in/ggH2btst
To view or add a comment, sign in
-
Short article about hybrid quantum-classical machine learning as a lax monoidal functor from the compact closed category to a quite arbitrary Cartesian category Smooth. It would be interesting if the authors picked any particular tangent category instead of Smooth in the next step. I would prefer any model of Synthetic Differential Geometry of course 😊 The existence of a right adjoint functor might be intriguing too. https://lnkd.in/eKP_FAE8
To view or add a comment, sign in
-
Homework 6: Sorting Algorithms
To view or add a comment, sign in
-
Post 13: Exploring Graph Algorithms #algorithms #problemsolving #computerscience #graphalgorithms
To view or add a comment, sign in
-
CTP Week 8: So far I moved my computation to google colab, but seems I have to make my model less complex, regardless I will leave it for later and begin using/integrating openCV with the model. This week I had also been introduced to Hugging face and learning what other ways I can change or do differently to help me with my project: Using Hugging Face, I can leverage open-source models to split an image into patches and use a transformer to learn how each patch relates to the others to reconstruct the full image rather than the bottom-up approach that CNNs typically use, which use use convolutions to learn the hierarchical features of an image from low-level features to high-level abstract things(like emotion).
To view or add a comment, sign in
-
I've just uploaded a new post to my blog: "Implementing Variational AutoEncoders (VAEs) in PyTorch" https://lnkd.in/eec4mPK8
To view or add a comment, sign in
-
𝗠𝗲𝗱𝗶𝗮𝗻 𝗼𝗳 𝗧𝘄𝗼 𝗦𝗼𝗿𝘁𝗲𝗱 𝗔𝗿𝗿𝗮𝘆𝘀 Today, I tackled one of the most challenging problems in algorithms: finding the Median of Two Sorted Arrays. This problem tested my problem-solving and optimization skills, pushing me from a brute-force approach to an efficient solution using binary search. 𝑩𝒓𝒖𝒕𝒆 𝑭𝒐𝒓𝒄𝒆: Initially, I created a third array by merging both sorted arrays and then located the median directly. While functional, this approach was inefficient due to Time Complexity: O((n1+n2)log(n1+n2)) Space Complexity: O(n1+n2) 𝑴𝒐𝒔𝒕 𝑶𝒑𝒕𝒊𝒎𝒂𝒍 𝑨𝒑𝒑𝒓𝒐𝒂𝒄𝒉 - 𝑩𝒊𝒏𝒂𝒓𝒚 𝑺𝒆𝒂𝒓𝒄𝒉: The real breakthrough came with Binary Search. I could efficiently search for the median by dividing the arrays at specific positions. Time Complexity: O(log(n1)+log(n2)) Space Complexity:O(1) #ProblemSolving #BinarySearch #Algorithms
To view or add a comment, sign in
-
-
🌟 Day 27/100 of My DSA Challenge – Greetings, LinkedIn Family! 🌟 Today, I solved another exciting problem from Striver’s A2Z DSA Sheet: 1️⃣ Search in a Sorted 2D Matrix 🔍 What I Learned Today: Applied Binary Search in a 2D matrix to locate a target element efficiently. Explored techniques to treat a 2D matrix as a flattened 1D array for optimized searching. This problem highlighted how binary search can extend beyond linear arrays to solve multi-dimensional challenges. Every day, this challenge sharpens my problem-solving skills and expands my perspective on algorithms. Onward and upward! 🚀 #100DaysOfDSA #StriversA2ZSheet #Day27 #BinarySearch #ProblemSolving #Algorithms
To view or add a comment, sign in
-
-
Somehow implementing margin distribution research has evolved into creating a Tensorflow to Pytorch converter. I have a genuine question. Should I release this converter as a separate library? Very surprised that this has not been done before. If so. What models should I make tests for? Right now I can convert convolutional layers, flatten layers, max pooling, and soon dense layers.
To view or add a comment, sign in