Leetcode-Q8

Remove Duplicates from Sorted List題目Given a sorted linked list, delete all duplicates such that each element appear only once...

Leetcode

Leedcode-Q7

Hamming Distansce (漢明距離)定義 將一個字符串變換成另一個字符串所需要替換的字符個數 題目123456789101112130 ≤ x, y < 231.Input: x = 1, y = 4Output: 2Explan...

Leetcode

Leetcode-Q6

12 Integer to RomanDescriptionGiven an integer, convert it to a roman numeral. Input is guaranteed to be within the range fro...

Leetcode

Leetcode-Q5

561 Array Partition IDescriptionGiven an array of 2n integers, your task is to group these integers into n pairs of integer, ...

Leetcode

Leetcode-Q4

9 Palindrome Number迴文數wiki Example12345678910111213141516171819202122232425const INT_MAX = 2147483647;let y = 0;if (x > 0 ...

Leetcode

Leetcode-Q3

7 Reverse IntegerExampleExample1: x = 123, return 321 Example2: x = -123, return -321 解題Version 1第一個想到的方式就是先用字串的方式 ...

Leetcode

Leetcode-Q2

1 Two sumFirst solution123456789101112131415161718var twoSum = function(nums, target) { var index, index2 = -1, ...

Leetcode

Leetcode-Q1

538 Convert BST to Greater TreeDescriptionGiven a Binary Search Tree (BST), convert it to a Greater Tree such that every key ...

Leetcode