Tony's Log HackerRank "AND xor OR" Actually I think problem statement is somewhat misleading. No need to mention range [L, R] at all. The intention is a variation to "Largest Rectangle" which is a classic stack problem on LeetCode. But you need to run Largest Rectangle twice: increased...
Really interesting problem! My 1st solution was DP based, like bottom-up pattern, but it got TLE since it is O(n^2). Then I thought there must be a O(n) solution. And yes there is :) It is an art of counting - what you learnt in your Combinatorics class :) #include <cmath>...
Choose a language, whether it'sJava,C,C++,Python, or any other of your preference. Before diving into coding, grasp the foundational elements of the language, including basic syntax, data types, variables, operators, conditional statements, loops, functions, etc. Optionally, explore Object-Oriente...
N/A [HackerRank]. Change to Anagram.java Easy [String] Java 211 N/A Implement Queue using Stacks.java Easy [Design, Stack] Java 212 N/A Basic Calculator.java Hard [Binary Tree, Expression Tree, Math, Minimum Binary Tree, Stack] Java 213 N/A Word Squares.java Hard [Backtracking, Trie...
Learn the basics of bit manipulation. Be able to explain what AND, OR, and XOR do. Know what a signed integer is. Know that there are 8 bits in a byte. Know what assembly is (from a high level), and get a sense of the basic operations that hardware exposes.This awesome videoabout...
Tony's Log HackerRank "Xor and Sum" Actually I think it should belong to category of 'Bits Manipulation'.. but still, a really good one. My first reaction was, how to derive from a ^ (b << i) from a ^ (b << (i - 1)), but after some thoughts, I figured out that that ...
The implementations for DSA in this repository are primarily done in the following languages: Python Java C++ However, the core logic remains the same, and hence, these solutions can be translated into any other programming language. Contributing Pull requests are welcome. For major changes, please...
Once you add all the files in your branch, it time to push your code for generating a pull request. git status This checks whether you are on your created branch or the master branch. If it shows master, type: git checkout <Your Branch Name> Now its time for the Git operations...