Jul 22, 2025 · 2 min read · So, currently in my college, we are dealing with a topic that many dread—I mean, I get it. The concept of computers switching from simple memory storage for variables or even arrays to now creating stack or heap type memory for static and dynamic mem...
Join discussion
Jul 3, 2025 · 1 min read · The Problem: Given an array of integers, nums and a target integer, the task is to find the indices of two numbers in nums that add up to target. We are to assume there's always one unique solution, and we can't use the same element twice. The order ...
Join discussion
Jul 2, 2025 · 2 min read · The Problem: An array is give, but it is randomly rotated. Right to Left rotation. We have to find a specified element in the array and return its index. The main issue would be the required time complexity being O(logn). The Solution: Of course, we ...
Join discussion
Jul 1, 2025 · 2 min read · The Problem: We are given an array prices, which stores the stock value for each day -represented by the indices. They expect us to return the maximum profit possible by buying stock on one day and selling it on another day. Buy must happen before Se...
Join discussion
Jun 30, 2025 · 3 min read · Given Problem: We are to find two elements in the given array, such that they add up to a specified target number. Leetcode has stated that the array will have distinct elements and only have one solution. Solution Nested Loops class Solution { publi...
Join discussion
Jun 29, 2025 · 3 min read · The Problem: Link to Problem Finding the minimum element in a sorted array that has been rotated. An array of length ‘n’ sorted in ascending order can be rotated between 1 and n times. The given examples; the array nums = [0,1,2,4,5,6,7] will change ...
Join discussion
Jun 28, 2025 · 3 min read · The problem: return maximum product of elements from a subarray in the given array, Given: 1 <= nums.length <= 2 * 10<sup>4</sup> -10 <= nums[i] <= 10 The product of any subarray of nums is guaranteed to fit in a 32-bit integer. Solution: Nes...
Join discussion
Jun 27, 2025 · 3 min read · We have to return the maximum sum of elements from a subarray belonging to the given array. Given an integer array nums, find the subarray with the largest sum, and return its sum. Nested Loops was the only solution that I got after half an hour of...
Join discussion