Tiger's leetcode solution
Wednesday, January 18, 2017
382. Linked List Random Node
›
Q: Given a singly linked list, return a random node's value from the linked list. Each node must have the same probability of being...
Tuesday, January 17, 2017
368. Largest Divisible Subset
›
Q: Given a set of distinct positive integers, find the largest subset such that every pair (S i , S j ) of elements in this subset satis...
Monday, January 2, 2017
404. Sum of Left Leaves (Easy)
›
Given the root of a binary tree, return the sum of all left leaves. A leaf is a node with no children. A left leaf is a leaf that is ...
387. First Unique Character in a String
›
Q: Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples:...
Sunday, January 1, 2017
389. Find the Difference
›
Q: Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and the...
383. Ransom Note
›
Q: Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that wil...
374. Guess Number Higher or Lower
›
Q: We are playing the Guess Game. The game is as follows: I pick a number from 1 to n . You have to guess which number I picked. ...
‹
›
Home
View web version