How to use Leetcode with Example (#705.Design Hashset)

preview_player
Показать описание
In this video I have explained how to use #Leecode website effectively and explained one problem statement

Solution-1
class MyHashSet {

boolean[] arr;

/** Initialize your data structure here. */
public MyHashSet() {
arr =new boolean[10000000];
}

public void add(int key) {
arr[key]=true;
}

public void remove(int key) {
arr[key]=false;
}

/** Returns true if this set contains the specified element */
public boolean contains(int key) {
return arr[key];
}
}

Creator : Mane D.B.
Editor :Yashwant

Thanks for watching video.........
Рекомендации по теме
Комментарии
Автор

Thank you so much Sir for all your efforts and sharing your knowledge with us . Very clearly explained.🔥🔥🔥👍🏻👍🏻😃

sujittadadikar
visit shbcf.ru