Home
Mohd Irfan
Cancel
largest rectangle

Largest Rectangle

Problem: Largest Rectangle Solution 1: Using for loop and if-else statement Time Complexity: O(n^2) - (TLE) def largestRectangle(h): max_area = 0 for i in range(len(h)): min_he...

02. Console

Open Web Browser Inspect -> console and let’s do some fun: // Error -> a is not define a; // Alert Massage alert(120); // Clear the console from inspect clear() console.log() console ob...

01. Comments and Shortcuts

string slicing and their functions

08. String Slicing and their Fuctions

String Uses: Convert first letter of a word into capital latter Convert all letter of a word into Capital letter Search a word in a book String : String is combination of characters ...

python exercise

07. Add two numbers | Exercise

Write a program to add two numbers using input() function. Solution 1 # Add two numbers num1 = int(input("Enter first number: ")) num2 = int(input("Enter second number: ")) print("Sum of", num1, ...

input function in python

06. Input Function in Python

input() function is used to take input from user. Syntax input("Enter your name: ") Example name = input("Enter your name: ") print("Hello", name) Type Conversion # input() function always ...

Python Introduction

05. Variables

Variables Variables are used to store data. Variables are like containers. Variables are case sensitive. Variables are dynamically typed. Variables are assigned using = operator. Vari...

Python Introduction

04. Escape Sequence

Escape Sequences: \\ –> To print Backslash \ \" –> Double Quote “ \' –> Single Quote ‘ \n –> New Line \t –> Tab \r –> Carriage Return \b ...

print function in python

03. Print Function in Python

Syntax print("Hello World") # parameter accepts as string # Error: invalid syntax # print(Hello World) Every “print” statement start from new line: # print ends with a new line print("Hi")...

Python Introduction

02. Comments

Statements that ignores python interpreter. Single line comment start from # Multi line comment written in 3 double inverted comma """ """ or ''' ''' Single Line Comment # This is single l...