Problem statementGiven an Array of Positive and Negative Integers, find out the Maximum Subarray Sum in that ArrayExampleIf input array is − {-12, -5, 4, -1, -7, 1, 8, -3} then output is 9AlgorithmCalculate the prefix sum of the input array.Initialize− min_prefix_sum = 0, res = -infiniteMaintain a loop for i = 0 to n. (n is the size of the input array).cand = prefix_sum[i] – miniIf cand is greater than res (maximum subarray sum so far), then update res by cand.If prefix_sum[i] is less than min_prefix_sum (minimum prefix sum so far), then update min_prefix_sum by prefix_sum[i].Return resExample Live Demo#include ... Read More
To set the color of a text, use the color property.ExampleYou can try to run the following code to learn how to work with the color property in CSS: ANTARTICA is a continent
The text-decoration property is used to underline, overline, and strikethrough text.ExampleThe following example demonstrates how to decorate a text. Possible values are none, underline, overline, line-through, blink. This will be underlined This will be striked through. This will have a over line. This text will have blinking effect
The direction property is used to set the text direction. Possible values are ltr or rtl.ExampleYou can try to run the following code to set the text direction with CSS: This text will be renedered from right to left
To set the font-stretch of an element, use the font-stretch property. Possible values could be normal, wider, narrower, ultra-condensed, extra-condensed, condensed, semi-condensed, semi-expanded, expanded, extra-expanded, ultra-expanded. If this doesn't appear to work, it is likely that your computer doesn't have a condensed or expanded version of the font being used.
The font-variant property is used to create a small-caps effect. Possible values are normal and small-caps. This text will be rendered as small caps
The font-weight property is used to increase or decrease how bold or light a font appears. The font-weight property provides the functionality to specify how bold a font is. Possible values could be normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, 900. This font is bold. This font is bolder. This font is 500 weight.
This property enables you to adjust the x-height to make fonts more legible. Possible value could be any number.Example Asia is a continent.
The font-family property is used to change the face of a font. Possible value could be any font family name. This text is rendered in either georgia, garamond, or the default serif font depending on which font you have at your system.
The font-size property is used to increase or decrease the size of a font. The font-size property is used to control the size of fonts. Possible values could be xx-small, x-small, small, medium, large, x-large, xx-large, smaller, larger, size in pixels or in %. This font size is 15 pixels This font size is small This font size is large
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP