abhishek.meLeetcode 921. Minimum Add to Make Parentheses ValidLink to Problem and LeetCode's Solution. Intuition We have to find number of extra brackets that would be required. if (() -> at last 1 bracket would be added => +1 if ((())A -> at we need (A) => +2 brackets if ((( -> we need 3 brackets i.e length...Oct 10, 2024·3 min read
abhishek.meLeetcode @198. House RobberYou are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security systems connected and it will auto...Jan 21, 2024·2 min read
abhishek.meLeetCode @70.Climbing StairsQuestion Link and Solution You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? Solution : Intuition to this question: if 1 stair ==> 1 step...Jan 18, 2024·2 min read
abhishek.meDigital SignaturesWhat are digital Signatures in bitcoin and crypto? Digital signatures are a means for the owner of a coin on the ledger to establish their intent to use that coin in a transaction. Digital signatures work by generating a unique hash of the message an...May 13, 2023·2 min read
abhishek.meSliding Window :find a max sum of subarray of size k{3 here}. Example : 1) arr[] : {3,2,4,5,2,1,1,1,1,3,3} , sum = 5, k = 2: output : [4,5] = 9 class Sliding{ int findMax(int arr[], int k, int size){ int i = 0; int j = 0; int sum = 0; ...Mar 22, 2023·1 min read