Sumit Mazumdarsumitmazumdar.in·Sep 6, 2023Understanding and Converting Mathematical Expressions: Infix, Postfix and Prefix NotationsInfix Notation Infix is the day-to-day notation that we use of format A + B type. The general form can be classified as (a op b) where a and b are operands(variables) and op is the Operator. Example 1 : A + B Example 2 : A * B + C / D Postfix Not...Discuss·55 readspostfix
Akarsh Jainakarshjain.hashnode.dev·Aug 29, 2023The Prefix Sum: A Simple but Efficient Data StructureIf you've started to venture into the world of programming, you might have come across situations where you need to work with parts of a list, even though you might not realize it just yet. No worries if this sounds new – I'm here to walk you through...Discuss#PrefixSum
Nilesh Saininileshsaini.hashnode.dev·May 30, 2023Find Pivot IndexThere are countless ways to approach this problem and optimize your solution. In this article, we’ll explore one of those strategies to tackle this problem. Let’s see the problem statement first. Problem Statement: Given an array of integers nums, c...Discuss·67 readsJavaScript
Siddharth Tambattechtronic.hashnode.dev·May 1, 2023The Magic of Prefix Array: Boosting Your Programming Skills📍Introduction A Prefix array is a simple yet effective tool in computer programming. It helps to minimize the repeated calculations done in an array and reduces the time complexity of your program. 📍What is a Prefix Array? A Prefix Sum Array is a c...Discuss·10 likes·140 readsData Structures & Algorithmsprefix-sum
Rahul Saxenarahrsaxena.hashnode.dev·Jun 18, 2022Leetcode 75: Day 1: 724. Find Pivot IndexQuestion: Given an array of integers nums, calculate the pivot index of this array. The pivot index is the index where the sum of all the numbers strictly to the left of the index is equal to the sum of all the numbers strictly to the index's right. ...Discussarrays
Rahul Saxenarahrsaxena.hashnode.dev·Jun 18, 2022Leetcode 75: Day 1: 1480. Running Sum of 1d ArrayQuestion Given an array nums. We define a running sum of an array as runningSum[i] = sum(nums[0]…nums[i]). Return the running sum of nums. Example 1: Input: nums = [1,2,3,4] Output: [1,3,6,10] Explanation: Running sum is obtained as follows: [1, 1+2,...Discuss·32 readsArraysarray