LeetCode - Blind 75 - Two Sum

The Problem Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to the target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order. Example Input: nums = [2,7,11,15], target = 9 Output: [0,1] Explanation: Because nums[0] + nums[1] == 9, we return [0, 1]....

October 25, 2024 · 2 min · Dmytro Chumakov

DSA - Merge Sorted Array Problem

Introduction In the previous chapter, we discussed Data Structures and Algorithms, delved into an overview of Dynamic Arrays, and solved the “Remove Element” problem. In this article, I’m going to show one of the ways to solve the 88. Merge Sorted Array problem. Problem You are given two integer arrays, nums1 and nums2, sorted in non-decreasing order, and two integers, m and n, representing the number of elements in nums1 and nums2, respectively....

August 15, 2024 · 3 min · Dmytro Chumakov

Data Structures and Algorithms Arrays Swift

Introduction I’ve always been curious about data structures and algorithms, and how they can improve user experiences while saving money for businesses through optimized computations. In this series of articles, I’m going to solve LeetCode problems and share my approach with you. I’ve just started my journey in solving LeetCode problems, so my solutions might not be as efficient as they could be, but I’m always looking for improvement. Before each topic, I’ll provide a brief introduction to the data structure, algorithm, or technique I’ll be using to solve a specific problem....

August 12, 2024 · 3 min · Dmytro Chumakov