Bhadreshkumar Ghevariyablog.bhadreshghevariya.com·Nov 10, 2024I wrote the first leetcode program after a Year and made simple mistakes.Today, I tried to use my problem-solving muscle and tried solving easy-level problems on leetcode. At first, this problem looked very easy to me, So I noted down important pieces of information and started to solve the problem on paper. Still, I took...1 likeFirst leetcode
Brian Maimbabrianmaimba.hashnode.dev·Oct 31, 2024Two sumThis article will highlight two approaches the brute force and the efficient approach Question Leetcode link -> https://leetcode.com/problems/two-sum/description/ Given an array of integers nums and an integer target, return indices of the two number...Leetcode Seriesleetcode
Ashikur Rahmanashikonweb.hashnode.dev·Oct 10, 2024Understanding the Two-Pointer TheoryThe two-pointer theory is a technique commonly used to solve array or linked list problems in a more efficient manner. Instead of using nested loops, which can increase the time complexity of a problem, two-pointer theory allows us to traverse the da...1 like·27 readsTutorial
Michael Strombergmjstromberg.hashnode.dev·Oct 4, 2024Solving the “Two Sum” Problem in JavaScriptPhoto by Ben Wicks on Unsplash Algorithm design plays a crucial role in coding interviews, especially for software engineering roles. While some companies place more emphasis on algorithmic challenges than others, they are particularly important for ...AlgorithmsJavaScript
Debjoty Mitrablog.debjotyms.com·Oct 4, 20241. Two SumYouTube Video https://youtu.be/hfN4VONP4HQ [A1] - Brute Force Time: O(n^2) Space: O(1) class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: for i in range(len(nums)): for j in range(i+1, len(nums)): ...DSAtwo-sum-problem
SANTOSH SINGHsantoshsingh.hashnode.dev·Sep 1, 2024Mastering the Two-Pointer Technique in Java: A Detailed GuideWhat is the Two-Pointer Technique? The two-pointer technique is a pattern often used in scenarios where you need to search for pairs in a sequence or compare elements in a sorted array or list. As the name suggests, it involves using two pointers, ty...Problem Solvers' Journalthreesum
eclaircpcompetitive-programming.hashnode.dev·Jul 27, 2024Two Sum - LeetCodeProblem Link C++ Code class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { map<int, int> hashMap; vector<int> ans; for(int i=0; i<nums.size(); i++) { int num = nums[i]; ...LeetCode Solutionsleetcode
Bruno Rossibrunorossi.hashnode.dev·Jul 23, 2024Arrays and listsAfter I didn't pass my last coding interview, I decided to spend some time learning about data structures and algorithms, with the goal to improve my performance in technical interviews. I've been doing daily challenges on AlgoExpert and watching the...Python
Ujjwal Sharmaujjwalsharma.hashnode.dev·Jul 6, 2024Two sum problem (The foundation)NOTE - please read this article properly and solve the question twice once on paper and then on leetcode because this question serves as the foundation for the upcoming question In this category that is, 3 sum and 4 sum Question Click Here Approaches...two-sum-problem
Vineeth Chivukulavineethchivukula.hashnode.dev·Jun 26, 2024Solving Two Sum II - Input Array Is SortedTo see the question, click here. Naive Approach The idea is to check all possible pairs to ensure that the sum of the numbers at those pointers equals the target. So, maintain two pointers i and j at the first two positions of the array and return th...two-sum-problem