{"action":"opened","issue":{"url":"https://api.github.com/repos/zhewang2/2017-Interviews-Data-Points/issues/1","repository_url":"https://api.github.com/repos/zhewang2/2017-Interviews-Data-Points","labels_url":"https://api.github.com/repos/zhewang2/2017-Interviews-Data-Points/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/zhewang2/2017-Interviews-Data-Points/issues/1/comments","events_url":"https://api.github.com/repos/zhewang2/2017-Interviews-Data-Points/issues/1/events","html_url":"https://github.com/zhewang2/2017-Interviews-Data-Points/issues/1","id":263006236,"number":1,"title":"Data Structures","user":{"login":"zhewang2","id":7659293,"avatar_url":"https://avatars2.githubusercontent.com/u/7659293?v=4","gravatar_id":"","url":"https://api.github.com/users/zhewang2","html_url":"https://github.com/zhewang2","followers_url":"https://api.github.com/users/zhewang2/followers","following_url":"https://api.github.com/users/zhewang2/following{/other_user}","gists_url":"https://api.github.com/users/zhewang2/gists{/gist_id}","starred_url":"https://api.github.com/users/zhewang2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhewang2/subscriptions","organizations_url":"https://api.github.com/users/zhewang2/orgs","repos_url":"https://api.github.com/users/zhewang2/repos","events_url":"https://api.github.com/users/zhewang2/events{/privacy}","received_events_url":"https://api.github.com/users/zhewang2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-05T05:09:52Z","updated_at":"2017-10-05T05:09:52Z","closed_at":null,"author_association":"OWNER","body":"Arrays\r\n- Arrays.asList() convert from array to List\r\n- Arrays.sort()\r\n\r\nStack\r\n- last-in-first-out\r\n- push, pop, peek, search\r\n\r\nQueue (Priority Queue)\r\n- first-in-first-out\r\n- add, offer, remove, pool, element, peek\r\n![2017-10-05 00_56_05-queue java platform se 8](https://user-images.githubusercontent.com/7659293/31211542-f2b55706-a967-11e7-8cbd-6639722ef9e6.png)\r\n\r\nList (*ArrayList, *LinkedList, Vector)\r\n- ordered collection\r\n- allow duplicate element\r\n- allow null element\r\n- add, get, remove\r\n- List list = Collections.synchronizedList(new ArrayList());\r\n\r\nSet (*HashSet, TreeSet, LinkedHashSet)\r\n- not duplicate element\r\n- at most one null element\r\n- add, remove\r\n- contains\r\n- Set s = Collections.synchronizedSet(new HashSet(...));\r\n\r\nMap(*HashMap, TreeMap, LinkedHashMap, HashTable)\r\n- key-value pair data structure\r\n- cannot contain duplicate keys\r\n- each key can map to at most one value\r\n- put, remove, get\r\n- entrySet, keySet\r\n- containsKey, containsValue\r\n- Map m = Collections.synchronizedMap(new HashMap());\r\n\r\nCollections make data structure thread safe\r\n- Collection c = Collections.synchronizedCollection(myCollection);\r\n\r\nThread-safe Data Structures\r\nVector\r\nCopyOnWriteArrayList\r\nCopyOnWriteArraySet\r\nConcurrentHashMap"}}
{"actor":{"display_login":"zhewang2"}}