0/1 Knapsack - How is it NP Complete?Knapsack problem is called Weakly NP complete or pseudo-polynomial. Time complexity of solving it is - O(n*W) .The value of W is linear but the length of W is exponential - length in terms of bits. Pseudo polynomial means - running time is a polyno...Jun 13, 2024 · 1 min readbooleanbit1.hashnode.dev
Roadmap for Software Engineer Interview prepI have created the above road map when I was going through Cracking the Coding Interview book's first chapter a while back. I felt that the roadmap needed a little customization so I created this. Hopefully someone may stumble upon this and get some ...Jan 18, 2024 · 1 min readbooleanbit1.hashnode.dev
Strings, Char and Integer manipulation in JavaWhen solving Data Structures and Algorithms (DSA) questions related to strings, I consistently have a conceptual understanding of manipulating input strings to achieve the desired output. However, leveraging the built-in methods or properties of the ...Nov 23, 2023 · 4 min readbooleanbit1.hashnode.dev
Navigating the Paradox of Progress: Finding Harmony with TechnologyThe perception that modernism and technology are failing us might stem from various factors and viewpoints. It's important to recognize that technology itself is not inherently good or bad; it's how we use it and the consequences of its use that matt...Aug 29, 2023 · 3 min readbooleanbit1.hashnode.dev
GeeksfoGeeks: Swap all odd and even bitsProblem Link: https://practice.geeksforgeeks.org/problems/swap-all-odd-and-even-bits-1587115621/1?page=1&status[]=bookmarked&sortBy=submissions Problem Statement: Given an unsigned integer N. The task is to swap all odd bits with even bits. For examp...Jun 23, 2023 · 2 min readbooleanbit1.hashnode.dev