Skip to content

Instantly share code, notes, and snippets.

View shadow-prince's full-sized avatar
:octocat:
WATCHING ANIME

Sai Kishore shadow-prince

:octocat:
WATCHING ANIME
  • Future
View GitHub Profile
@shadow-prince
shadow-prince / TimSort.py
Created July 26, 2021 02:59
Timsort Algorithm
import random
def InsertionSort(array):
for x in range (1, len(array)):
for i in range(x, 0, -1):
if array[i] < array[i - 1]:
t = array[i]
array[i] = array[i - 1]
array[i - 1] = t
@shadow-prince
shadow-prince / BasicPhone.ts
Last active April 9, 2021 17:30
Refer these for inheritance and more...🎈
import { Mobile } from "./Mobile";
export class BasicPhone extends Mobile{
mobileType:string;
constructor(mobileName:string,mobileCost:number,mobileId: number,mobileType:string){
super(mobileId, mobileName, mobileCost);
this.mobileType=mobileType;
}