Skip to content

Instantly share code, notes, and snippets.

View ctj01's full-sized avatar

Cristian Mendoza ctj01

View GitHub Profile
x = [
"shoat",
"tubal",
"eclat",
"olam",
"stat",
"gnar",
"babai",
"scoad",
"scrap"
x = [
"shoat",
"tubal",
"eclat",
"olam",
"stat",
"gnar",
"babai",
"scoad",
"scrap"
""" muteable object """
l = [1 , 26, 9]
l[2] = 8
print(l)
#output
#[1, 26, 8]
l = [1 , 26, 9]
iterator = iter(l);
print(iterator.__next__())
#1
##s = sorted(x, key = lambda x:x[-2:])
##print(s)
x = [
"shoat",
"tubal",
"eclat",
"olam",
"stat",
## common functions
def add(i,j):
return i + j
a = add(5,4);
print(a)
##lambda expressions
a = lambda x , y : x + y
@ctj01
ctj01 / trie.js
Last active September 25, 2024 19:43
Trie
import React, { useState, useEffect } from 'react';
import data from './movies/movies_batch_0.json';
class Trie {
constructor() {
this.root = {};
}
insert(word) {
let node = this.root;