Explore
Curator's Pick
Login
Sign up
Alessandra
2257 Followers
1349 Following
Köln
Writer / Researcher
Blog
Comments
Replies
Connections
Wallet
@drago18121996
0
about 2 months ago
ita
Anagram
export class Anagram { input : string; constructor(input: string) { this.input = input.toLowerCase(); } public matches(...potentials: string[]): string[] { let…
@drago18121996
0
about 2 months ago
ita
Complex number
export class ComplexNumber { r : number; i : number; constructor(real: number, imaginary: number) { this.r = real;
@drago18121996
0
2 months ago
ita
Grains
export const square = (num) => { if(num<=0 || num > 64) throw new Error('square must be between 1 and 64'); return 2n**BigInt(num-1); }; export const total =…
@drago18121996
0
3 months ago
ita
School
class School: def \_\_init\_\_(self):
@drago18121996
0
8 months ago
ita
Reverse with Groovy
class ReverseString { static reverse(String value) {
@drago18121996
0
8 months ago
ita
Darts
export const score = (x,y) => { let radius = Math.sqrt(x*x+y*y); if (radius <= 1) return 10; else if (radius > 1 && radius <= 5) return 5; else if (radius…
@drago18121996
0
8 months ago
ita
Perfect numbers
using System; using System.Linq; public enum Classification { Perfect,
@drago18121996
0
8 months ago
ita
Accumulate
class Raindrops def self.convert(numb) output = ""
@drago18121996
0
8 months ago
ita
Sieve
export function primes(num: number): number[] { const numer: number[] = []; for(let i=2; i<=num; i++){ if(Isprimes(i)){
@drago18121996
0
8 months ago
ita
Darts
UPDATE darts SET Score = CASE WHEN x*x+y*y > 100 THEN 0 WHEN x*x+y*y > 25 THEN 1 WHEN x*x+y*y > 1 THEN 5 ELSE 10 END;
Menu
Explore
Curator's Pick
Trade
Trade STEM