/Leet-Code

In this repository I have to upload Leet Code problem's code.

Primary LanguageJava

Leet-Code


1::MaximumSubarray

Leet code problem:53. Maximum Subarray Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.

A subarray is a contiguous part of an array.

Example 1:

Input: nums = [-2,1,-3,4,-1,2,1,-5,4] Output: 6 Explanation: [4,-1,2,1] has the largest sum = 6.

https://leetcode.com/problems/maximum-subarray/


2::Evaluate Reverse Polish Notation

Leet-Code problem::150. Evaluate Reverse Polish Notation Evaluate the value of an arithmetic expression in Reverse Polish Notation.

Valid operators are +, -, *, and /. Each operand may be an integer or another expression.

Note that division between two integers should truncate toward zero.

It is guaranteed that the given RPN expression is always valid. That means the expression would always evaluate to a result, and there will not be any division by zero operation. https://leetcode.com/problems/evaluate-reverse-polish-notation/


ExcleSheetColumnNumber

Leet-Code problem::171. Excel Sheet Column Number Given a string columnTitle that represents the column title as appear in an Excel sheet, return its corresponding column number. https://leetcode.com/problems/excel-sheet-column-number/

8::Create maximum Subarry

GFG problem:: Given an array arr of N integers. Find the contiguous sub-array with maximum sum.

https://practice.geeksforgeeks.org/problems/kadanes-algorithm-1587115620/1#