- 博客(9)
- 收藏
- 关注
原创 109. Convert Sorted List to Binary Search Tree
// TO BE DONE // More details of my own understanding needs to be added... Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. For this pro...
2020-05-12 05:01:06 73
原创 su authentification failed
Linux by default disabled the root, so to enable it, you shouldn't use su, use "sude -i" instead!
2020-05-12 05:00:51 226
原创 916. Word Subsets
We are given two arraysAandBof words. Each word is a string of lowercase letters. Now, say thatwordbis a subset of wordaif every letter inboccurs ina,including multiplicity. For exa...
2020-05-12 05:00:17 63
原创 乐鑫2020春招笔试
三部分: 选择(10道英文题) 基本就是些概率统计和线代的东西,外加一点数据结构(二叉树的前中后序遍历) 概统: 俩色块,每个色块可取值0-7,要求相邻色块取值相差的绝对值不超过2,问可以取值的种类数 线代:好几道求特征值和特征向量 的题,但矩阵都是2x2的所以,直接手算就好,最多用用韦达定理简化计算; 编程2道 问答和编程题彻底暴露了我的渣渣本质。。。我这种渣渣只配去写网页orz 1) 买卖股票,给你未来N天的股价,可以买卖两次,但每次买入后必须先卖出了才能再买入,求最大收益; 买卖一次我会做
2020-05-12 04:59:42 448
原创 几种树的遍历
经常碰到笔试题问这个,故总结一下 前序遍历(preorder traversal) 访问顺序: Root, Left, Right Preorder traversal is used to create a copy of the tree. Preorder traversal is also used to get prefix expression on of an expression tree Why prefix is useful? polish notation 2. 中序遍历 (in
2020-05-12 04:59:21 95
原创 537. Complex Number Multiplication
Given two strings representing twocomplex numbers. You need to return a string representing their multiplication. Note i2= -1 according to the definition. Example 1: Input: "1+1i", "1+1i" Output...
2019-10-16 03:44:23 47
原创 Enable GLSL syntax highlight inside html script tag
/* This is just my own summary of the answer on StackOverflow original answer link is posted at the end of this blog*/ Default sublime text editor can only highlight things according to file extensio...
2019-10-03 11:20:49 109
原创 236. Lowest Common Ancestor of a Binary Tree
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to thedefinition of LCA on Wikipedia: “The lowest common ancestor is defined between two nodes p...
2019-10-02 07:25:24 54
原创 Notes on Science of Program Ch1: Propositions
Basic concepts: 1. state: a *function* from a set of identifiers to the set of values T and F; e.g: {(identifier,boolean)} form: given set {(a,T),(bc,F),(yl,T)}, s(a) denotes value of the function ...
2019-05-14 09:21:09 89
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人