摘要:
题目 Given a list of numbers with only 3 unique numbers (1, 2, 3), sort the list in O(n) time. Example 1: Input: [3, 3, 2, 1, 3, 2, 1] Output: [1, 1, 2,
阅读全文
posted @ 2019-10-11 16:47
Optimus_Prime
阅读(165)
推荐(0)
摘要:
题目 Given a singly linked list, reverse the list. This can be done iteratively or recursively. Can you get both solutions? Example: Input: 4 3 2 1 0 NU
阅读全文
posted @ 2019-10-10 01:30
Optimus_Prime
阅读(121)
推荐(0)
摘要:
题目 Given a sorted array, A, with possibly duplicated elements, find the indices of the first and last occurrences of a target element, x. Return 1 if
阅读全文
posted @ 2019-10-09 01:18
Optimus_Prime
阅读(211)
推荐(0)
摘要:
题目 Imagine you are building a compiler. Before running any code, the compiler must check that the parentheses in the program are balanced. Every openi
阅读全文
posted @ 2019-10-08 02:40
Optimus_Prime
阅读(196)
推荐(0)
摘要:
题目 A palindrome is a sequence of characters that reads the same backwards and forwards. Given a string, s, find the longest palindromic substring in s
阅读全文
posted @ 2019-10-08 02:34
Optimus_Prime
阅读(245)
推荐(0)
摘要:
题目 Given a string, find the length of the longest substring without repeating characters. 分析 任意2个重复的字符不可能同时存在于一个合法的子串中。因此,可以从左到右扫描字符,用一个字典记录出现过的字符。 一旦
阅读全文
posted @ 2019-10-08 02:24
Optimus_Prime
阅读(409)
推荐(0)
摘要:
问题描述 You are given two linked lists representing two non negative integers. The digits are stored in reverse order and each of their nodes contain a s
阅读全文
posted @ 2019-10-08 02:18
Optimus_Prime
阅读(192)
推荐(0)
摘要:
最近读了一篇 "《如何胜任一个小型公司的技术总监?》" 的文章,深有感触。对照自身在公司中遇到的情况,我给自己做了个现状分析。作为程序员,长久的职业价值是什么?如何让自己多年的经验不白费?如何跟精力更好的年轻人竞争? 我特别赞同文中一句话:”软件开发是类似外科医生的行业,而不是血汗工厂,所以不需要手
阅读全文
posted @ 2019-05-08 13:00
Optimus_Prime
阅读(868)
推荐(0)
摘要:
MemoryRouter 会缓存组件,导致有时候 componentDidMount 不会执行
阅读全文
posted @ 2017-08-14 19:25
Optimus_Prime
阅读(117)
推荐(0)
摘要:
资源汇集帖: 中文文档: Store 如何引入? 有3种方法: 通过 props 传递 直接 import 通过 context / Provider 机制传 可根据可测试性、使用方便性自己选择。 如何和 react router 一起用? 表单 mobx react form 主要特点: 支持3种
阅读全文
posted @ 2017-08-12 19:31
Optimus_Prime
阅读(343)
推荐(0)