• Leetcode [Medium] 260 - Single Number III

    LeetCode 260 Single Number III 문제 출처 문제 Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once. Example: Input: [1,2,1,3,2,5] Output: [3,5] Note: The order of the result is...


  • Leetcode [Medium] 79 - Word Search

    LeetCode 78 Word Search 문제 출처 문제 Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The same letter cell may not be used...


  • Leetcode [Easy] 203 - Remove Linked List Elements

    LeetCode 203 Remove Linked List Elements 문제 출처 문제 Remove all elements from a linked list of integers that have value val. Example: Input: 1->2->6->3->4->5->6, val = 6 Output: 1->2->3->4->5 나의 코드 /** * Definition for singly-linked list. * function ListNode(val, next) { * this.val = (val===undefined ? 0 :...


  • 2020-07 셋째 주

    🟥 : 미완료 ✅ : 완료 7 / 20 (월) ✅ 알고리즘 문제 풀기 es6 에 추가된 data type 인 BigInt 에 대해 알게됐다. BigInt 를 사용하면 Number.MAX_SAFE_INTEGER 보다 더 큰 수의 계산도 정확하게 가능해서 알고리즘 문제 풀기에 유용할 것 같다. 그리고 Numeric literal 도 알게 되었다. 0b숫자 0o숫자 0x숫자...


  • Leetcode [Easy] 67 - Add Binary

    LeetCode 67 Add Binary 문제 출처 문제 Given two binary strings, return their sum (also a binary string). The input strings are both non-empty and contains only characters 1 or 0. Example 1: Input: a = "11", b = "1" Output: "100" Example 2: Input: a = "1010", b =...