Leetcode 242: valid anagram

https://leetcode.com/problems/valid-anagram/ Given two strings s and t, write a function to determine if t is an anagram of s. For example,s = “anagram”, t = “nagaram”, return true.s = “rat”, t = “car”, return false. Note:You may assume the string contains only lowercase alphabets. Follow up:What if the inputs contain unicode characters? How would you …

Leetcode 115: Distinct Subsequences

https://leetcode.com/problems/distinct-subsequences/ Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence of a string is a new string which is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (ie, "ACE" …

Leetcode 65: valid number

https://leetcode.com/problems/valid-number/ 65. Valid Number Total Accepted: 38767 Total Submissions: 328141 Difficulty: Hard Validate if a given string is numeric. Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => true Note: It is intended for the problem statement to be ambiguous. You should gather all requirements up front before implementing one. …

Use SSH tunnel and Firefox for proxy

1.Use a specified port (e.g., 12345) for SSH SOCKS server: ssh -D 12345 user@host.domain 2. Go to the setting menu in Firefox, then Advanced->Network->Connection->Settings 3.Check the “Manual proxy configuration”, fill in SOCKS host (127.0.0.1) and port (your specified port, 12345 in our example) 4. Also, type in “about:config” in the address bar in Firefox, change …