摘要:
Description Given a sorted (in ascending order) integer array of elements and a value, write a function to search in . If exists, then return its inde 阅读全文
摘要:
Description You are given a license key represented as a string S which consists only alphanumeric character and dashes. The string is separated into 阅读全文
摘要:
Description Given a valid (IPv4) IP , return a defanged version of that IP address. A defanged IP address replaces every period with . Example 1: Exam 阅读全文
摘要:
Description Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. Example 1: Example 2: Example 阅读全文
摘要:
Description Given an array of size $n$, find the majority element. The majority element is the element that appears more than times. You may assume th 阅读全文
摘要:
Description Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to th 阅读全文
摘要:
Description Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) Push element x onto stack. pop() 阅读全文
摘要:
Description A sentence is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters only. We would like to c 阅读全文
摘要:
Description Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lis 阅读全文
摘要:
Description A valid parentheses string is either empty , , or , where and are valid parentheses strings, and represents string concatenation. For exam 阅读全文
摘要:
clipboard.js是一个用来设置剪切板的库,小巧无依赖,但用法有点诡异,必须依赖一个DOM元素 据作者说,由于浏览器相关安全策略的缘故,无法使用下面这种方式来设置剪切板 必须要与一个DOM元素相关联,并且需要用户的点击操作才能实现功能(这样看来,浏览器还是挺安全的) 普通使用推荐下面这种用法, 阅读全文
摘要:
Description Given an array with integers, your task is to check if it could become non decreasing by modifying at most element. We define an array is 阅读全文
摘要:
Description Given a tree, rearrange the tree in in order so that the leftmost node in the tree is now the root of the tree, and every node has no left 阅读全文
摘要:
Description Given a array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear run 阅读全文
摘要:
Description On a table are cards, with a positive integer printed on the front and back of each card (possibly different). We flip any number of cards 阅读全文