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...1 min read·booleanbit1.hashnode.devJun 13, 2024
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 ...1 min read·booleanbit1.hashnode.devJan 18, 2024
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 ...4 min read·booleanbit1.hashnode.devNov 23, 2023
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...3 min read·booleanbit1.hashnode.devAug 29, 2023
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...2 min read·booleanbit1.hashnode.devJun 23, 2023