Skip to content

Instantly share code, notes, and snippets.

@RuChuanLin
RuChuanLin / HashTableOpenAddressing.java
Last active January 7, 2021 17:08 — forked from pedrofurtado/HashTableOpenAddressing.java
Implementation of Hash Table (with Open Addressing) in Java.
/**
* Hash table with open addressing.
*
* <p>This contains some common methods of Map interface, including size, isEmpty, put, get, remove,
* containsKey
*
* <p>For open addressing hash table, we use 100% of the inner array space, and it is a close
* hashing. When collision occurs, it has to find an empty position to store the element. Pedro
* provided few methods to probe a new index. I am not quite familiar with quadratic probing, so the
* default probing method is linear probing, which means if the index is occupied, it automatically
@mason276752
mason276752 / jsnote.js
Created September 24, 2017 11:44
你平常不會用到的js
str1 = "http://www.google.tw/search?q=中文";
obj = {
get a(){return '1';},
set b(value){this.c = value;},
c:1
};
class Cls{
constructor(name){
console.log("hello",name);
if (typeof(new.target)==='function')