摘要:
Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runti 阅读全文
摘要:
Medium Medium Medium Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: "tree" Output: "eert" Explana 阅读全文
摘要:
725. Split Linked List in Parts Medium 725. Split Linked List in Parts Medium Medium Given a (singly) linked list with head node root, write a functio 阅读全文
摘要:
Given an array of integers, find out whether there are two distinct indices iand j in the array such that the absolute difference between nums[i] and 阅读全文
摘要:
678. Valid Parenthesis String Medium Given a string containing only three types of characters: '(', ')' and '*', write a function to check whether thi 阅读全文
摘要:
324. Wiggle Sort II 摆动排序问题 324. Wiggle Sort II 摆动排序问题 摆动排序问题 Given an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3]. 阅读全文
摘要:
Given a binary search tree (BST) with duplicates, find all the mode(s) (the most frequently occurred element) in the given BST. Assume a BST is define 阅读全文
摘要:
You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time 阅读全文