Two Sum - LeetCode EasyProblem Link - https://leetcode.com/problems/two-sum/ class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { int n=nums.size(); //finding the length of the dynamic array i.e., our vector unordered_map<int,int...1 min read·rajattiwari.hashnode.devJul 14, 2022
Introduction to Computer NetworkWhat is Computer Network? A computer network is a collection of various computing devices that are connected using multiple paths for the purpose of sending/recieving data or media. A sender send a data to the reciever while both sender i.e, client a...2 min read·rajattiwari.hashnode.devJun 19, 2022
How to grow 1% Everyday?Rule of 1.01 1.01 ^ 365 = 37.8 Everyday do a little to grow and atleast try to do. Here are 5 ways to grow 1% daily. 1. Fail more, Fail fast & Fail big: If we Fail more often, fail faster, fail bigger, we learn more & grow more. I used to avoid fai...2 min read·rajattiwari.hashnode.devApr 20, 2021
Reverse Integer - Leetcode SolutionSo, the problem statement is: Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-231, 231 - 1], then return 0. The solution is in python. class Solutio...1 min read·rajattiwari.hashnode.devMar 20, 2021
Two Sum - Leet Code SolutionSo, the problem statement was: Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same elem...2 min read·rajattiwari.hashnode.devMar 20, 2021