Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am imhuyqn on github.
  • I am huyng (https://keybase.io/huyng) on keybase.
  • I have a public key ASChc2Z-vUEfiP4uvLfTA--s5QfGYedlcnSJLe3dBdAoDwo

To claim this, I am signing this object:

@huy-qn
huy-qn / minchar.py
Last active September 20, 2018 00:33
Python MinChar
def minChar(s):
cnt = [0] * 26
for x in s:
cnt[ord(x) - 65] += 1
min_char = len(s)
for x in cnt:
if x != 0 and x <= min_char:
min_char = x
for i in range(26):
if cnt[i] == min_char:
@huy-qn
huy-qn / main.rs
Created December 29, 2017 00:25
Fibonacci Numbers in Rust
fn main() {
if it_works() {
println!("It works", )
};
}
fn fibo_number_generate(x: i32) -> (i32){
let mut f_0 = 0;
let mut f_1 = 1;
import React, { Component } from 'react';
import defaultAuthor from './defaultAuthor.svg';
class AuthorMiniProfile extends Component {
constructor(props) {
super(props);
this.state = {
isImgLoaded: false,
};
}