Value Yourself(293)
-
[leetcode] 347. Top K Frequent Elements
Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order. Example 1: Input: nums = [1,1,1,2,2,3], k = 2 Output: [1,2] Example 2: Input: nums = [1], k = 1 Output: [1] Constraints: 1
2022.12.20 -
[leetcode] 3. Longest Substring Without Repeating Characters
Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" Output: 3 Explanation: The answer is "abc", with the length of 3. Example 2: Input: s = "bbbbb" Output: 1 Explanation: The answer is "b", with the length of 1. Example 3: Input: s = "pwwkew" Output: 3 Explanation: The answer is "wke", with the length of 3. Notice that the ans..
2022.12.19 -
[Foundation of Data science] 추론 통계
목차 : 이항 분포 (Binomial Distribution) 연속 Uniform 분포 (Continuous Uniform Distribution) 정규 분포 (Normal Distribution) 중심 극한 정리 (Central Limit Theorem (CLT)) 점 추정 (Point estimation) 신뢰 구간 (Confidence Interval) 이항 분포 (Binomial Distribution) 문제 설명 Lavista 박물관의 방문객중 80%는 박물관 내의 기념품 점에서 결국 기념품을 구매합니다. 다음주 일요일날, 임의의 10명의 표본이 선택되었습니다. : 모든 사람들이 기념품 점에서 결국 기념품을 구매할 확률을 구하세요. 최대 7명의 방문객들이 기념품 점에서 기념품을 구매할 확률을 구..
2022.12.10 -
[leetcode] 771. Jewels and Stones
You're given strings jewels representing the types of stones that are jewels, and stones representing the stones you have. Each character in stones is a type of stone you have. You want to know how many of the stones you have are also jewels. Letters are case sensitive, so "a" is considered a different type of stone from "A". Example 1: Input: jewels = "aA", stones = "aAAbbbb" Output: 3 Example ..
2022.12.09 -
[leetcode] 706. Design HashMap
Design a HashMap without using any built-in hash table libraries. Implement the MyHashMap class: MyHashMap() initializes the object with an empty map. void put(int key, int value) inserts a (key, value) pair into the HashMap. If the key already exists in the map, update the corresponding value. int get(int key) returns the value to which the specified key is mapped, or -1 if this map contains no..
2022.12.08 -
[leetcode] 23. Merge k Sorted Lists
You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists into one sorted linked-list and return it. Example 1: Input: lists = [[1,4,5],[1,3,4],[2,6]] Output: [1,1,2,3,4,4,5,6] Explanation: The linked-lists are: [ 1->4->5, 1->3->4, 2->6 ] merging them into one sorted list: 1->1->2->3->4->4->5->6 Example 2: Input: lists = [] Output: ..
2022.12.06