top of page

Ashwin Shirva
4 days ago6 min read
974. Subarray Sums Divisible by K - LeetCode Fastest Solution
Given an array nums and an integer k, return the number of non-empty subarrays that have a sum divisible by k. A subarray is a contiguous
15 views1 comment

Code Recipe
Jan 314 min read
2574. Left and Right Sum Differences - LeetCode Best Solution
Given an integer array nums return an array result such that result.length == nums.length and result[i] is the absolute difference between
17 views1 comment

Ashwin Shirva
Jan 295 min read
930. Binary Subarrays With Sum - LeetCode Fastest Solution
Given a binary array nums and an integer goal, return the number of subarrays with a sum equal to goal. A subarray is a contiguous part of
25 views1 comment


Ashwin Shirva
Jan 255 min read
560. Subarray Sum Equals K - LeetCode Fastest Solution
Given an integer array nums and an integer k, return the total number of subarrays in nums whose sum is equal to k. A subarray is a
147 views1 comment


Code Recipe
Jan 234 min read
1991. Find the Middle Index in Array - LeetCode Fastest Solution
Given an integer array nums, find the middle index in array, middleIndex. Note that you must find the leftmost middle index in nums array.
36 views1 comment


Code Recipe
Jan 184 min read
234. Palindrome Linked List - LeetCode Fastest Solution
Given the head of singly linked list, return true if it is a palindrome, false otherwise. A palindrome is a sequence that reads the same for
23 views1 comment
bottom of page