Skip to content

Instantly share code, notes, and snippets.

View asmarton's full-sized avatar
🇷🇴

Alexandru-Sergiu Marton asmarton

🇷🇴
  • Freelancer
  • Romania
  • 01:29 (UTC +03:00)
View GitHub Profile
package com.brown121407;
import java.io.*;
import java.util.*;
public class Main {
private static <T extends Comparable<T>> void SortList(List<T> list) {
for (int i = 0; i < list.size(); i++) {
for (int j = 0; j < list.size() - i - 1; j++) {
https://jsbin.com/macuka/edit?html,js,output
https://jsbin.com/vilubah/2/edit?html,js,output
https://jsbin.com/picituc/edit?js,output
https://jsbin.com/cuhuded/2/edit?js
https://jsbin.com/hixige/2/edit?js
https://jsbin.com/vonuha/2/edit?js
https://jsbin.com/pamakib/edit?html,css,js,output
https://jsbin.com/jitahos/1/edit?html,css,js,output
https://jsbin.com/damomoq/1/edit?html,js,output
https://jsbin.com/giqojin/1/edit?html,js,output
https://jsbin.com/jatoqev/edit?html,js,output
https://jsbin.com/dezotak/edit?html,js,output
https://jsbin.com/fulajoj/edit?html,js,output
https://jsbin.com/xelabez/1/edit?html,js,output
https://jsbin.com/sefezan/edit?html,js,output
https://jsbin.com/muyahew/1/edit?html,js,output
https://jsbin.com/mubeyec/edit?html,js,output
https://jsbin.com/gagaler/edit?html,js,output
set __toaster_color_orange FD971F
set __toaster_color_blue 6EC9DD
set __toaster_color_green A6E22E
set __toaster_color_yellow E6DB7E
set __toaster_color_pink F92672
set __toaster_color_grey 554F48
set __toaster_color_white F1F1F1
set __toaster_color_purple 9458FF
set __toaster_color_lilac AE81FF
@asmarton
asmarton / factorial.py
Created October 28, 2018 05:55
A python program to compute the factorial for a given number. Written for Google Code-in
def factorial(n: int):
"""Computes the factorial for a given number
Doesn't implement any limitation on the input's size because
as specified in the python documentation for Numeric Types
https://docs.python.org/2/library/stdtypes.html#numeric-types-int-float-long-complex
"Long integers have unlimited precision"
:return: The factorial of n
"""
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!\n";
return 0;
}
print("Hello World!")
colors = ["red", "orange", "yellow", "green", "blue", "indigo", "violet"]
for color in colors:
if color == "green":
print("Found green in the list!")