LeetCode: 171-Excel Sheet Column Number 解題紀錄
題目
Given a string columnTitle
that represents the column title as appear in an Excel sheet, return its corresponding column number.
Read More »LeetCode: 171-Excel Sheet Column Number 解題紀錄Given a string columnTitle
that represents the column title as appear in an Excel sheet, return its corresponding column number.
Read More »LeetCode: 171-Excel Sheet Column Number 解題紀錄Given an arrayRead More »LeetCode: 169-Majority Element 解題紀錄nums
of sizen
, return the majority element. The majority element is the element that appears more than⌊n / 2⌋
times. You may assume that the majority element always exists in the array.
Given string num representing a non-negative integerRead More »LeetCode: 402-Remove K Digits 解題紀錄num
, and an integerk
, return the smallest possible integer after removingk
digits fromnum
.
Given a non-empty array of integers nums
, every element appears twice except for one. Find that single one.
You must implement a solution with a linear runtime complexity and use only constant extra space.
Read More »LeetCode: 136-Single Number 解題紀錄Given an integer array nums
of unique elements, return all possible subsets (the power set).
The solution set must not contain duplicate subsets. Return the solution in any order.
Read More »LeetCode: 78-Subsets 解題紀錄Given two stringsRead More »LeetCode: 567-Permutation in String 解題紀錄s1
ands2
, returntrue
ifs2
contains a permutation ofs1
, orfalse
otherwise. In other words, returntrue
if one ofs1
's permutations is the substring ofs2
.
You are given two stringsRead More »LeetCode: 389-Find the Difference 解題紀錄s
andt
. Stringt
is generated by random shuffling strings
and then add one more letter at a random position. Return the letter that was added tot
.