摘要: 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 阅读全文
posted @ 2019-08-21 13:39 arcsinW 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Description You are given a license key represented as a string S which consists only alphanumeric character and dashes. The string is separated into 阅读全文
posted @ 2019-08-09 19:10 arcsinW 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-08-06 11:28 arcsinW 阅读(228) 评论(0) 推荐(0) 编辑
摘要: Description Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. Example 1: Example 2: Example 阅读全文
posted @ 2019-08-05 15:28 arcsinW 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-08-05 11:04 arcsinW 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-08-01 11:19 arcsinW 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 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() 阅读全文
posted @ 2019-07-31 15:51 arcsinW 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-07-29 22:20 arcsinW 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-07-29 15:53 arcsinW 阅读(116) 评论(0) 推荐(0) 编辑
摘要: Description A valid parentheses string is either empty , , or , where and are valid parentheses strings, and represents string concatenation. For exam 阅读全文
posted @ 2019-04-19 20:27 arcsinW 阅读(391) 评论(0) 推荐(0) 编辑
摘要: clipboard.js是一个用来设置剪切板的库,小巧无依赖,但用法有点诡异,必须依赖一个DOM元素 据作者说,由于浏览器相关安全策略的缘故,无法使用下面这种方式来设置剪切板 必须要与一个DOM元素相关联,并且需要用户的点击操作才能实现功能(这样看来,浏览器还是挺安全的) 普通使用推荐下面这种用法, 阅读全文
posted @ 2019-04-11 18:43 arcsinW 阅读(574) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-04-06 15:48 arcsinW 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-02-20 21:28 arcsinW 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-02-19 21:56 arcsinW 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-01-24 22:11 arcsinW 阅读(290) 评论(0) 推荐(0) 编辑