Here is the link.
From January 2015, she started to practice leetcode questions; she trains herself to stay focus, develops "muscle" memory when she practices those questions one by one. 2015年初, Julia开始参与做Leetcode, 开通自己第一个博客. 刷Leet code的题目, 她看了很多的代码, 每个人那学一点, 也开通Github, 发表自己的代码, 尝试写自己的一些体会. She learns from her favorite sports – tennis, 10,000 serves practice builds up good memory for a great serve. Just keep going. Hard work beats talent when talent fails to work hard.
Thursday, July 18, 2019
Wednesday, July 17, 2019
My vacation day
July 17, 2019
It is my vacation day. I had to push myself to go out play tennis and try to get more sports and enjoy outdoor activities.
I like to work on a plan to lose 10 lbs. I like to experience the joy to play tennis, and actually less worry about my weight, enjoy to get social with a lot of Canadians on tennis court.
I need to get back to normal sleep to recover my biology clock. It is not healthy to stay and work past 12:00 AM.
Introduction
It is my vacation day. I had to push myself to go out play tennis and try to get more sports and enjoy outdoor activities.
My plan to lose 10 lbs this summer
I like to work on a plan to lose 10 lbs. I like to experience the joy to play tennis, and actually less worry about my weight, enjoy to get social with a lot of Canadians on tennis court.
I need to get good habit to sleep early
I need to get back to normal sleep to recover my biology clock. It is not healthy to stay and work past 12:00 AM.
Fast money trader Karen Finerman - secure your finance future
Nov. 6, 2019
It is my favorite video. I like to write something to share with my friends in north America, alumni from Shanghai Jiaotong univeristy.
I love the presentation of 3 minutes. Specially I like to take notes from CNBC TV, the notes are well-written and I like to memorize them as well.
Here is the video.
Start investing today
Finerman says:
How to get started
Top excuses for not investing
Introduction
It is my favorite video. I like to write something to share with my friends in north America, alumni from Shanghai Jiaotong univeristy.
8 minutes video
I love the presentation of 3 minutes. Specially I like to take notes from CNBC TV, the notes are well-written and I like to memorize them as well.
Here is the video.
Start investing today
Finerman says:
How to get started
- Over time, investing builds wealth
- Compouding is where real wealth-building difference is made
- Pick a modest goal to start
- $50/month equates to just $1.67/day
- Many plans take small amount of money for no additional fee
Do not make a choice to do it. Just do it.
- Develop your investing muscle and you'll want to keep flexing it
- Add bigger chunks to your investments as you start earning more
Invest in you: Read. Set. Grow.
Investing tools for success
Top excuses
For not investing
Top excuses for not investing
"I'll start to invest when I make more money."
I am always in stock market.
I love equity exposure.
Overtime it is the place to be.
Don't over think it. Really, do not let emotion get to the way. Just do it.
I am too old for this to make a difference.
- This is the youngest you'll ever be for the rest of your life - it's never too late to start
- Sticking your head in the sand is not a plan.
76. Minimum Window Substring
Here is my discussion post.
It is challenging task to design a sliding window which has intelligent way to keep count all chars in sliding window no matter whether the char is in pattern string t. I choose to write a solution based on the video shared by Daniel Su.
Small case stduy
S = "ACBA", t ="AB",
There is step by step explanation in the above video using the above test case. I also like to explain the design.
About right pointer in sliding window
if the char on position of right pointer has bank value bigger than 0, then the char is counted towards to be one of chars in pattern t. Variable count decrement one, no matter right char is in pattern string t, bank count will always decrement one.
if the char on position of right pointer has bank value bigger than 0, then the char is counted towards to be one of chars in pattern t. Variable count decrement one, no matter right char is in pattern string t, bank count will always decrement one.
About left pointer in sliding window
It is similar idea to hanlde left pointer. The argument is if bank[leftChar] > 0, then one of chars in pattern string s is removed from sliding window, count variable should decrement one.
It is similar idea to hanlde left pointer. The argument is if bank[leftChar] > 0, then one of chars in pattern string s is removed from sliding window, count variable should decrement one.
Why it is hard level algorithm?
- Fact 1:
work on test case
s = "ABBB", t = "ABB", the pattern string may have duplicate chars. So the sliding window should contain all unique chars and also its count for each char. The minimum sliding window should contain all unique chars in pattern string, and also keep at least same count for each char as well.
s = "ABBB", t = "ABB", the pattern string may have duplicate chars. So the sliding window should contain all unique chars and also its count for each char. The minimum sliding window should contain all unique chars in pattern string, and also keep at least same count for each char as well.
- Fact 2:
How to determine if the string in sliding window contains (denoted as sw) all chars in pattern string s?
counting sort all chars in sw and s, and then compare each char and its count. This takes O(k) time, k is distinct chars in pattern string t. It can be O(1) time instead.
How to design the technique to make it O(1)?
For example, S = "ACBA", t ="AB".
Char C's bank value from 0 to -1, and then left pointer moves away index = 1, go back to 0. Since C is not in string t, C's bank value will never go beyond 0.
Char C's bank value from 0 to -1, and then left pointer moves away index = 1, go back to 0. Since C is not in string t, C's bank value will never go beyond 0.
First it is the design in template to document all chars in sliding window using bank array. Even the characters not in pattern string t will be recorded, for characters in pattern string t will be recorded using bank array, since pattern string may have more than one copy of the same char, how to tell which copy of char goes to count of pattern string t.
Next count variable is introduce to keep "the sliding window contains all char and it's count in pattern string t" checking O(1) time.
Five minutes to understand count variable design
It is tough job to design count variable. It took me hours to understand when to increment one to count variable, when to decrement one to count variable.
One thing I can do is to show a simple test case. The solution is not difficult to write at all.
s = "AAB", t = "AB",
I think that the above test case first 'A' is visited, bank['A'] = 1, so count variable should be incremented by one. Second 'A' is visited, bank['A'] = 0, so count variable will not be incremented.
I think that the above test case first 'A' is visited, bank['A'] = 1, so count variable should be incremented by one. Second 'A' is visited, bank['A'] = 0, so count variable will not be incremented.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _76_minimum_window_substring_optimal
{
class Program
{
static void Main(string[] args)
{
}
/// <summary>
/// July 15, 2019
/// study code
/// https://www.youtube.com/watch?v=9odu9ImG9oY
/// </summary>
/// <param name="s"></param>
/// <param name="t"></param>
/// <returns></returns>
public string MinWindow(string s, string t)
{
if (s == null || s.Length == 0 ||
t == null || t.Length == 0)
{
return "";
}
var bank = new int[256];
int left = 0;
int right = 0;
int count = 0;
int min = Int32.MaxValue;
string minString = "";
var pLength = t.Length;
var length = s.Length;
for (int i = 0; i < pLength; i++)
{
bank[t[i]]++;
}
while (right < length)
{
var rightChar = s[right];
right++; // always advance one to next iteration
if (bank[rightChar] > 0)
{
count++;
}
bank[rightChar]--; // always decrement one no matter char is in pattern t or not
// move left pointer until missing one char from string t
while (count == pLength)
{
var size = right - left;
if (min > size)
{
min = size;
minString = s.Substring(left, right - left);
}
// shift our window
var leftChar = s[left];
left++; // always move left pointer
bank[leftChar]++; // always increment one no matter char is in pattern t or not
if (bank[leftChar] > 0) // that means left char is one of chars in pattern, also count as one
{
count--;
}
}
}
return minString;
}
}
}
Tuesday, July 16, 2019
54. Spiral Matrix - practice in 2015
Here is my sharing on Leetcode.com.
It is tough job to write a C# solution to go over spiral array to print out all elements in the matrix. I wrote C# solution but I failed multiple test cases, I learned that it is easy to make mistake to count same element twice. Compare to use extra space to mark visit, the solution is prone to the bug for duplicated output.
Also back in 2015, I also need to learn C# better to write more readable code.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _54_Spiral_matrix_2015_June
{
class Program
{
static void Main(string[] args)
{
}
/// <summary>
/// code written in June 12, 2015
/// </summary>
/// <param name="matrix"></param>
/// <returns></returns>
public IList<int> SpiralOrder(int[,] matrix)
{
IList<int> list = new List<int>();
int len1 = matrix.GetLength(0);
int len2 = matrix.GetLength(1);
int[][] matrix_input = new int[len1][];
for (int i = 0; i < len1; i++)
matrix_input[i] = new int[len2];
for (int i = 0; i < len1; i++)
for (int j = 0; j < len2; j++)
{
matrix_input[i][j] = matrix[i, j];
}
ArrayList al = spiralOrder_2(matrix_input);
foreach (object s in al)
{
list.Add((int)s);
}
return list;
}
public ArrayList spiralOrder_2(int[][] matrix)
{
if (matrix == null || matrix.Length == 0 || matrix[0].Length == 0)
return new ArrayList();
return spiralOrder_3(matrix, 0, 0, matrix.Length, matrix[0].Length);
}
/**
* Latest update: June 12, 2015
* Leetcode: spiral array
* http://gongxuns.blogspot.ca/2012/12/leetcode-spiral-matrix.html
* Test case:
* 1. empty array
* 2. one element: 1 -
* 2B. one row : 1 2 --
* 3. one column : 1 |
* 2 |
* 4. more than 1 row,
* or more than 1 column
* 1 2
* 3 4
* output: 1 2 4 3
* 5. 3 rows, 3 columns
* 1 2 3
* 4 5 6
* 7 8 9
* output: 1 2 3 6 9 8 7 4 5
*
*/
public ArrayList spiralOrder_3(int[][] matrix, int x, int y, int m, int n)
{
ArrayList res = new ArrayList();
// test case: empty array
if (m <= 0 || n <= 0) return res;
// test case 2: one row and one column
if (m == 1 && n == 1)
{
res.Add(matrix[x][y]);
return res;
}
// row, from left to right
for (int i = 0; i < n - 1; i++)
{
res.Add(matrix[x][y++]);
}
// column, from top to down
for (int i = 0; i < m - 1; i++)
{
res.Add(matrix[x++][y]);
}
// conditional: second row, from right to left
if (m > 1)
{
for (int i = 0; i < n - 1; i++)
{
res.Add(matrix[x][y--]);
}
}
// conditional: second column, from bottom to top
if (n > 1)
{
for (int i = 0; i < m - 1; i++)
{
res.Add(matrix[x--][y]);
}
}
// test case: one row, 1 2 3, where 1 2 is procesed above and 3 is left for next round
// one column:
if (m == 1 || n == 1)
{
ArrayList l = spiralOrder_3(matrix, x, y, 1, 1);
foreach (object val in l)
res.Add((int)val);
}
else
{
ArrayList l = spiralOrder_3(matrix, x + 1, y + 1, m - 2, n - 2);
foreach (object val in l)
res.Add((int)val);
}
return res;
}
}
}
ESL course
学生篇
什么时候我不再上ESL英语
Wendy在国内念完初三,被录取到加拿大公立学校读10年。开学第一节ESL英语课,她发现听不懂老师所讲的,虽然在国内学了9年英语,新生水平测试成绩是D,她还是自知之明,主动找老师调低一级,从C级水平开始。上了几天课英语还是听不明白,Wendy再次向老师诉苦,又被调换课程从B级开始,终于,她可以安心坐在课室里。Wendy心里很清楚,英语不行听不懂老师所讲的,上课也是白搭的。第一周结束前,指导老师给了她最新一份课程表,英语降低了级别,其他的课程也相应做了调整,难度降低了。这本来是件开心的事,Wendy却不知从那里道听途说,开始担心自己会不会被迫降低一个年级,变成是8年级的学生。
看到她传来的新课程表,我知道向她的忧虑是多余的,我向她解释道,ESL的本身课程以及有ESL辅助的课程,不是取决年级而是根据英语整体水平和阅读开发程度而设置的。我指给她看的其他课程编码仍然是10年级的课程:视觉艺术、戏剧和数学。
我还开玩笑地说,你要感谢老师把你的英语难度一再调低,一方面让你有自信地上课,否则你坐在课室里只会是聋子和哑巴的,你提不起劲头去学习的了;另一方面也让你可以轻松地学英语的同时把精力投入到你不熟悉的其他学科中,4科当中有易有难,齐头并进。
Wendy开心不到一会儿,她又问:什么时候我才不用上ESL英语,直接读正常英语。我没有直接回答,而是先让她看了我之前写的关于ESL的文章摘要。
ESL分为五个级别,每一级别内又细分初中高三个阶段:
一,我们称之为英语初级班,这是很简单的第一级;
二,日常的英语,这会增加学生日常用的词语、语汇,学习课堂用语、课堂用语;
三,第三级学校或者功课上面常用的一些英语,会帮助学生在所有科目上英语的应用能力;
四,具有在英语环境里面的学习技能,为了学生将来要选修学术类课程或者应用型课程做准备;
五,最高的级别,也有称为英语之桥,因为学校要升大学、大专,需要高水平的英语,所以这个级别的英语课程就是为那些升大学和大专的学生做准确的。
刚抵加拿大,孩子都能够用中文听说会写,但英语的程度有限。英语作为第二语言(Englishas a Second Landguage ,简称ESL)的课程,可以帮助留学[微博]生学习英语,让他们能够同讲英语的同学一起学习全部课程和参与学校生活。
中学生有哪些 ESL辅助课程? 特别改编的课程有:历史、科学、职业研究、公民,以及其他的必修科目。要留意的地方:
一,中学ESL辅助课程不是取决年级而是根据英语熟练水平和阅读开发程度所设置
二,学生可以将多达3堂的ESL课程用来代替他/她毕业文凭所需的必修英语学分
如何选课每个学校都不一样,学校有一个课程表,列出每个年级可选的课程你要特别留意。详细情况你可以问你的辅导员或者英语老师。
完了,我告诉Wendy,ESL要上几年?视乎你的学习能力水平,通常三个月后你会发现自己的英语能力有所提高,一年之后,学习上用英语沟通己经畅通。当然,要完成ESL英语课程和辅助性课程,我估计也要二、三年的时间。
凭兴趣选了课,选错了要多读一年
Paul是国内高材生,来加拿大读12年级。他听说加拿大高中可以自由选课,去学校报到后自己上网选了慕昧已久的烹饪、木工和汽车修理等应用学科。学校老师告诉他,你这样选课一年后毕业没有问题,Paul一听可以按时毕业,一高兴,没有听下去老师说的下半句话,这种选课有可能读不上他的心仪大学的会计专业。我发现了,马上要他找老师改过来,他拖拉了好几天才去办公室找老师。开学第一周学生调课特别多,轮到他时,己经晚了。他应该选的11年级二门数学、会计、经济己经满额,老师只能安排他下学期再上。这样一来,他有可能要多读一年。我叫他星期一再去找老师,看看有什么补救措施,实在不行也先排在轮候名单上,有可能别的同学再调课他可以补上空缺。这个周末他被父母狠狠地训了一顿。
我给Paul解释的大意是:
一,加拿大高中实现的学分制就是用“两条腿走路”来办教育的。学分制的优越性在于学生可根据自己的爱好和未来发展来选课,假如将来你要读理科类大学的,在选学分选修课的时候你就要考虑选学术类的;假如你只是中学毕业后就出来工作,可能就会选择一些实用型技术的系列。为此加拿大很多高中还专门设立了开车驾驶课程,因为在加拿大16岁以上的学生就可以领取驾驶证了,学生可以通过学习驾驶的课程得到学分,其他还包括一些烹调的学分、男孩子做工艺、修理的学分等等。学分制下“两条脚走路”,一条是升学,另一条是就业。学校教会同学做出两种选择所具体的知识。让孩子们能够更好的为自己的未来职业和继续深造的学业做一些规划和设计的,让孩子们在高中阶段里有一种灵活性的选择。因为并非每一个加拿大学生都去读大学,他们可能根据自己不同的兴趣和爱好选择读职业大专或直接就业。学分制“两条脚走路”无形中把学生未来去向做了一个分流。这与中国通过中考[微博]把学生分流有所不同。
二,每个新生来报到,学习顾问或辅导员都会发一本学校选课指引手册给你,然后他们会教你如何进入学校网站登记,用自己的学生身份号码登录,为自己在新学期里选择要上的课程。所有课程都是用代码的,每个课程都会有5个编号来显示课程的名称、年级和种类,例如9年级的基础数学课 MFN1P, MFN是课程的名称,1代表年级,P表示应用类的。你只要花点时间明白这些代码编号,下次选课你一定会得心应手的。
三,加拿大中学无论哪个省份的中学都会同时提供两套中学课程给他们的学生在中学时期去选择,这个选择是从9、10年级开始,我们把这两套课程分为Applied(应用)和Academy(学术)。应用课程是给那些学生为了满足中学毕业或者进入社区学院(大专)而用,学术课程是为了给那些学生想到大学就读本科而用。教育部门在学校课程代码上会把这些课程分为U课程(申请大学,大专通用),C课程(只可以申请大专),M课程(介乎学术和应用课程之间)。其中M课程在申请大学时限定不能够有多于3门左右。而大学申请时录取办公室只会看学生在中学时期的U课程,大专录取办公室的人会同时看U课程和C课程。
四,大都数来加拿大读高中的留学生都是为了继续在加拿大读大学,所以对于他们来说,高中课程中学术类的课程,对于中国的留学生来说特别重视。从9、10年级开始选学术类基础课程,到11、12年级选修与大学有关的预科类课程。
来加拿大读高中,除了英语,学习上我们还会遇到什么挑战?选课。在中国学生习惯了教育局统一安排,指定上什么课,就吃“大锅饭”式去上课。但在这里9年级开始的学分制,要学生自己选课,而且越往高年级自己选课责任越大,因为同将来大学专业要求有关系。只不过,如果你是高二才过来,只能专心用“倒计式”方法:大学专业要求什么中学成绩你想尽方法去满足,你基本没有机会享受选课自由的“福利”!
加拿大读高中
Here is the link of article.
如果是10年级及以前,建议读公校。首先读公校是留学加拿大的特权,去美国读不了。其次加拿大公校教育质量高而且更锻炼人。因为公校里的教育理念与北美大学更接轨,更需要孩子的自我管理能力、和老师同学(同学90%以上是本地人)的沟通能力。公校出来的孩子比一般华人私立国际学校出来的孩子能力更强,在大学更能脱颖而出。公立高中学费一般在12000~15000加元/年。
如果是12年级(高二毕业读加拿大高三)留学加拿大,我推荐选择比较有声誉,大学招生部门比较认可的私立国际学校就读。因为此时进入公立高中学生会跟不上节奏,而且会出现学分不够的情况,很多会导致无法按时毕业。而进入好的私立国际学校则比较灵活,可以通过补课等方式把学分修完,确保当年毕业。同学中也有一定比例的中国孩子,方便孩子快速融入。私立国际学校一般学费在25000~30000加元/年。
私立学校推荐
加拿大新东方国际学院 ( 英文全称:NOIC ACADEMY,简称:NOIC ) 坐落于加拿大安大略省多伦多市,是新东方教育科技集团的海外分校,一所全日制、中高端私立高中。学院提供全方位、一站式、个性化VIP教学服务;将高中学分课程、雅思托福考试、大学申请辅导和社会实践活动实现校内集成。同时,我们还定期邀请北美各个行业的领军人物给学生介绍所在行业的机遇与挑战,引导学生做出正确的专业选择,及早规划职业生涯,获得广博的国际视野,并激励学生努力奋斗。
私立国际高中的优势
公立高中主要为本地学生提供服务、班级人数相对较多,对于国际学生会一视同仁,老师不会因为国际学生身份而提供特殊照顾和帮助。国际学生从一种教育体系忽然转变到另一种教育体系环境下学习,会出语言和课程上的不适应,从而面临巨大压力。私立高中在同样的教育环境下,实行的小班授课甚至是一对一,不仅能够满足学生的学习需求,同时在语言和生活上得到帮助,能够在短时间适应当地的学习生活。
NOIC的最大的特点在于其独创的“一对一导师制”,即每个学生从入学的第一天开始,学校指定一位专职老师担任该同学的导师。导师为每一位学生不仅提供选课,语言培训和大学申请等方面的指导,同时也会为学生提供日常生活方面的帮助,从而使得学生不仅在学业上能够迅速进入状态,同时也能在较短的时间内适应加拿大的生活。导师通过与学生每天的朝夕相处,了解每一位学生的特点,并在日常生活中给予关怀和指导。我们的导师100%具有海外留学的经历,其中不乏多伦多大学教育学博士,硕士,知名大学教授,新东方教育集团培训师。他们对美国和加拿大的教育体系了如指掌。无论是申请材料的准备,还是和大学招生人员的沟通,以及如何在众多的录取通知书中进行选择,我们的老师均积累了丰富的经验,为学生进入理想的大学提供强有力的保障。事实证明,这种保姆式的大学申请辅导,可以将申请过程中的风险降至最低,替广大学生和家长解除后顾之忧。
高中留学加拿大
第一,高中留学加拿大,可以选择公立和私立高中,如果选择公立高中,至少需要读两年才能申请大学,也就是说,很难直接到加拿大读高三课程,如果选择私立高中的大学预备课程,最快一年可以毕业并申请大学。加拿大学校的录取名额有限,申请较晚及时学习优秀也无法获得名额。
第二,无论选择加拿大公立还是私立高中,最好提前半年甚至一年申请,这样对申请人,委托机构都最好,是双赢的结果。
第三,加拿大留学专家杨老师介绍说,学生最好读完高二再走,有些同学读了半个学期,然后就匆匆赴加读语言了,这样的好处是尽早接受正统的优质北美教育,但同样也会损失很多国内的学分,因为如果只上了一个学期,那么高二的学习可能不被加拿大高中认可并被要求在加拿大高中重修。因此建议最好完成了高二课程再走。
第四,如果高二留学加拿大,最好在高一和高二的寒暑假能安排一段强化英语的时间,这样对孩子今后赴加拿大留学很有好处。
ESL
所有申请加拿大公立高中的学生并不需要提供雅思或者托福的成绩,这些学生在入学的时候会 参加教育局安排的语言测试,根据测试的结果来决定自己需要读什么级别的ELS课程。所以这个ESL都是针对母语不是英语的学生而开设的语言课程。
这个测试结果会分为A,B, C,D,E五个等级,这五个等级的课程各有什么作用呢?
A --- 初级英语会话课程: 帮助学生英语入门,协助学生适应新生活
B --- 日常英语课程: 增加学生的英语常用词汇、学习课堂用语
C --- 学校及课业常用英语课程: 提高学生在所有科目上的英语运用能力
D --- 英语学习技巧:为修读学术英语及应用英语做好准备
E --- 英语衔接课程:为升大学以及大专做准备
ESL成绩的评估方面有:课程观察, 课堂参与情况,日常作业,测验和考试, 学生功课检查,做项目,口头与书面报告,段落与作文写作, 小组作业
教育局也会每年12月份,3月份和6月份分别给家长或者监护人寄送ESL的成绩单,方便监护人了解到学生的学习情况。
Canada high school
安省高中(其他省应该差不多)有三个毕业条件:
1. 修满30个学分
2. 收集40小时的社区义工服务
3. Pass安省的literacy test
首先说说这30个学分,它分18个必修学分和12个选修学分。这18个必修学分为:
Gr9:英语、数学、科学、法语、地理、体育、艺术类、
Gr10:英语、数学、科学、历史、civics/careers(各0.5credit)
Gr11:英语、数学
Gr12:英语
以上的都是你在各个年级必须选的课,但是,这只是15个学分,还有三个补充要求:
1. 在英语、或法语、或其他语言、或社会科学类、或Canadian and world studies类、或guidance and career education类、或cooperative education中再取得一个学分。
2. 在健康体育类、或艺术类、或business studies类、或法语、或cooperative education中再取得一个学分。
3. 在11或12年纪科学类、或technological education类、或法语类、或电脑类或cooperative education再拿一个学分。
紧接着又是一大批注释:
1. 最多只能有3个ESL或ELD学分能被算进4个英语必修学分内,也就是说不管你英语水平如何,12年纪你必须上普通的英语课才能毕业。
2. 在以上3个补充要求中都有法语,但最多只能有2个法语学分能被算入其内,而且第一个法语学分必须被算入第一个要求,另一个学分可以选择被算入第二或第三个要求。
3. 在以上3个补充要求中也都有cooperative education,但最多只能有2个cooperative education学分算入必修学分内。
一旦你把上面我的长篇大论理解清楚了,剩下的12个选修学分就简单多了。学生每年级最多可以选八门课,4乘8=32,所以你可以在11或12年纪有2个spare。当然也可以不选spare,这个依你的个人情况来定。
再接着说高中的另外两个毕业条件。40小时的义工听起来很多,但是你也有4年的时间来完成。而且想找义工干非常容易。学校的Student Service就会有许多的义工信息。建议做义工找容易的或与你的爱好或理想相关的。这样不仅做起来动力更大,对你以后申请大学和奖学金也有一定的帮助。很多人在完成40小时后还会接着干(劳动模范啊)这样不仅帮助申请大学,也可以积累一下你在社会上的工作经验。
至于literacy test(OSSLT),我建议大家不用过于担心。它的要求是pass了就行,而且成绩不会被算进你的平均分内。这个考试十年级做,我在9年纪英语得了85分,十年级OSSLT考了接近满分,很容易,而且英语不好的中国学生也不必担心,因为10年纪没过可以接着考,再考一次估计就肯定能过了
It is like a party to prepare this July 2019
I like to get together those algorithms to review before my phone screen from Facebook.
I just could not believe that I came cross so many new algorithms, and I need to write a few algorithms just to warm up my crafting skills.
My favorite one is to write quick select algorithm.
I just could not believe that I came cross so many new algorithms, and I need to write a few algorithms just to warm up my crafting skills.
My favorite one is to write quick select algorithm.
Zumba Vancouver waterfront
July 16, 2019
Introduction
It is my health research. I need to work on weight control project, one idea is to play more tennis sport. Another idea is to have a healthy life style.
I went to Zumba event with my coworkers today. Here is the old video.
Introduction
It is my health research. I need to work on weight control project, one idea is to play more tennis sport. Another idea is to have a healthy life style.
I went to Zumba event with my coworkers today. Here is the old video.
How I choose people to chat?
July 16, 2019
It is my personal finance research. I learn that I only have limit hours to work and chat with friends. I also get connected to friends quickly, last weekend a software engineer working in Citibank in New York left a comment in my blog, waistline problem, and then I chose to get connected.
I also like to have honest communication. I do not like to waste time to chat with friends, sometimes I think that chatting is such a big waste of time.
Go ahead to talk over phone 2 or 3 minutes. I start to stop responding any message in working hour from Linkedin.com, or gmail.com. I learn to evaluate how good the person can communicate.
Since I am below average as an interviewee on interviewing.io based on my 5 interviews, I start to think about how to make improvements as well.
Introduction
It is my personal finance research. I learn that I only have limit hours to work and chat with friends. I also get connected to friends quickly, last weekend a software engineer working in Citibank in New York left a comment in my blog, waistline problem, and then I chose to get connected.
How I choose people to chat?
I also like to have honest communication. I do not like to waste time to chat with friends, sometimes I think that chatting is such a big waste of time.
Go ahead to talk over phone 2 or 3 minutes. I start to stop responding any message in working hour from Linkedin.com, or gmail.com. I learn to evaluate how good the person can communicate.
Since I am below average as an interviewee on interviewing.io based on my 5 interviews, I start to think about how to make improvements as well.
How to get smart when you are over 50 years old?
July 16, 2019
It is my personal finance research. I like to write a small topic called how to get smart when you are over 50 years old.
I graduated from Shanghai Jiaotong university. So my friends from same universities shared with me their work experience.
Last year my classmate laughed about me to apply Facebook or Amazon; it should be young person's job. I took the advice, and learned from her advice. She invested on the stock market, so I started to invest on stock market as well back from March 2019.
I also like to learn from my friends. Do not let emotions get into my way. Just do it!
I think that working on algorithms, and also I help a lot of people to prepare their onsite interviews. I feel that it is such great time in my life.
Introduction
It is my personal finance research. I like to write a small topic called how to get smart when you are over 50 years old.
Listen to every advice
I graduated from Shanghai Jiaotong university. So my friends from same universities shared with me their work experience.
Last year my classmate laughed about me to apply Facebook or Amazon; it should be young person's job. I took the advice, and learned from her advice. She invested on the stock market, so I started to invest on stock market as well back from March 2019.
I also like to learn from my friends. Do not let emotions get into my way. Just do it!
I think that working on algorithms, and also I help a lot of people to prepare their onsite interviews. I feel that it is such great time in my life.
The secret to have a happy life as a software programmer
July 16, 2019
It is so challenging to work as a software programmer. I like to stay on my current job forever, since it is so enjoyable to work every day.
It is so challenging to meet a new person on interviewing.io. But I find that it is also very exciting experience.
I met an interviewee today, he told me that he went to Facebook onsite, Microsoft onsite, and prepare Amazon onsite. And he gave me feedback to work on communication skills.
He does not believe that my feedback on lowest common ancestor is true. He likes to test the code using web compiler.
One thing I can tell is how good I should be in order to pass facebook phone screen and get onsite.
July 17, 2019
Introduction
It is so challenging to work as a software programmer. I like to stay on my current job forever, since it is so enjoyable to work every day.
Happy life as a software programmer
It is so challenging to meet a new person on interviewing.io. But I find that it is also very exciting experience.
I met an interviewee today, he told me that he went to Facebook onsite, Microsoft onsite, and prepare Amazon onsite. And he gave me feedback to work on communication skills.
He does not believe that my feedback on lowest common ancestor is true. He likes to test the code using web compiler.
One thing I can tell is how good I should be in order to pass facebook phone screen and get onsite.
July 17, 2019
What is secret? Describe a happy life
I just finished the phone screen from Facebook. I like to add some content about secret, describe a happy life.
Tips to share
Here is the link.
接着跟大家说一些面试的技巧。
1)面试官的心态
面试官要看的,不是你会不会做题。会做题的人很多,好的engineer != 会做题的engineer。你要做的是在最有限的时间里展现这点。即使题不会做,也要展现出一个好的engineering thought process跟technical communication。
2)Coding Round
绝对不要秒做!
绝对不要秒做!
绝对不要秒做!
上面说了,要有好的thought process跟communication,拿到题要先思考所有的edge case,input形式,需要的run time和space complexity,逐一跟面试官沟通。当然,绝大多数的情况下,他们会说yeah assume XYZ,但是要他们说了才可以,你自己瞎assume肯定会挂的。
然后尽量不要像是背的。太极拳的精华在招意,不在招式,同理,解题的精华在思维,不在代码。最好的方式莫过于现场跟面试官先讨论逻辑和数据结,然后写出一些common test cast,然后代码一边写一边说,现场找到bug并且完善,会比闷头写码秒解好很多。而且秒解非常容易招很难的Follow Up,因为面试官不确定你是否真的理解还是只是做了题。
还有就是互动非常重要,写代码的时候尽量同时解释自己的思维,为什么要加一个storage variable,为什么选择这样的subroutine,为什么用这个library里的数据结构等等,然后写完别等他们问,直接说这个Runtime和Space complexity是什么,还有什么其他的方法,那些其他方法的complexity是什么等等,显示出自己是经过考虑才选择出这样的代码结构。很多国人小朋友都觉得沟通有障碍就不说话,但是这样不是明摆着自己承认不会交流吗?要记得,花这么多时间刷题的同时也要同时在沟通上面下功夫。
最后最后,要想想test case要怎么写,这个现在经常问,想想你在刷题的时候LC会有什么样的test case卡到你,写这些test case的人当时的想法,会很有帮助。
3)System Design
这个也是沟通的环节,个人倾向是先把所有的Use Case写出来,然后写出所有会需要的component,schema和大概的API,然后在开始做设计。重点是根据每一个Use case做出相对的实现,比如这个A Use Case需要high availability,所以我选择这个技术实现,这个B Use Case需要Atomic transaction,所以我要做这样的实现。跟Coding一样,要确定好scope和其他supproting的系统,比如Facebook/Linkedin经常问News Feed,你要问我需不需要考虑Relevance,sorting,context等等,大概率是不需要,但是你要展示出你在思考这些问题。然后Scope也要问清楚,这个东西的User是谁,deliverable是什么,我们需不要handle infrastructure scaling,需不需要handle各种UGC storage,后台的partition tolerance和load balancing和data duplication等等。一般情况下main design部分都会让你skip,然后选一两个比较精的部分问follow up,所以当你问这些scope的同事,心里面也该有个大概的底应该要如何实现。
4)BQ
BQ应该是最重要的环节,前面说了,会写码的人很多,能解决问题的人很少,能带领团队解决问题的人少之又少。这里所有BQ的问题都是为了验证3点。
a)你有没有problem solving skills?你解决问题有没有一定的策略,有没有办法确保相同的问题不会发生,有没有办法确保其他人不犯相同的错误,碰到自己没法解决的问题如何处理,自己直接导致的问题会如何处理,如何面对多个stakeholder不一致的方向及要求等等
b)你有没有leadership skills?团队有问题的时候你会怎么帮忙?遇到bug你是只修bug还是能深究问题并且surface给management,能不能在团队有困难时go above and beyond,能不能有效的沟通并且解决矛盾,在沟通的时候有没有对他人立场的认知和理解,并且就这个理解给出对他人最有用的答案等等
c)你有没有self awareness?你对自己的期许是什么,你最强的能力是什么,你在什么情况下会under perform,你明不明白自己在这个group里能起到多大的作用等等
面试官问的所有傻屌问题想要的答案都是你有没有一些上述的quality,而你要做的就是好好嗦发。一个好答案分成起承转合。
起:历史背景,为什么有这样的情况,其他人为什么没管,这个情况的consequence是什么
承:讨论自己的思考过程,为什么最后选择了这种方法解决问题,其他没有选择的方案有什么pros and cons
转:具体解决问题的时候遇到了什么样的困难,如何克服,学到了什么
合:最后结果,问题是否完美解决,后续有什么follow up,是否给你的org或者group带来了正面的影响等等
讲的时候多观察面试官,感觉他有问题的时候可以停一下,如果有什么笑点的时候也可以停一下缓和气氛(例如策划经常该需求,android native各种坑,samsung的OS多他妈傻逼之类的)。
5)Time to ask questions
一般情况下,能把问题答完都至少会pass,但是要有strong feedback你短短的几分钟问答就会很重要。我个人喜欢的问题是问Tech culture,比如我在用别的组的系统,发现不能实现我想做的功能,如果要加入这个功能会否给我这样的自由度,其他组会不会不高兴,将来的ownership和maintenence会如何分配,或者我会问有没有一些centralized的文档库,或者central services org,比如你之前碰到过的问题,花了很长时间才找到答案,我将来如果入职也遇到相同的问题会不会也需要花一样久的时间去找这些答案。如果对他们的业务不熟,也可以就问面试官他的经历,他来这儿几年,在那些组干过,具体业务是什么,觉不觉得有继续学习的深度和广度(要凸显自己热爱学习新技术),如果跟management提出想要跳出comfort zone会不会有阻力等等。尽量开始一个问答对话,尽量让对方感觉亲切。
最后希望所有同学都能找到自己心仪的offer!
接着跟大家说一些面试的技巧。
1)面试官的心态
面试官要看的,不是你会不会做题。会做题的人很多,好的engineer != 会做题的engineer。你要做的是在最有限的时间里展现这点。即使题不会做,也要展现出一个好的engineering thought process跟technical communication。
2)Coding Round
绝对不要秒做!
绝对不要秒做!
绝对不要秒做!
上面说了,要有好的thought process跟communication,拿到题要先思考所有的edge case,input形式,需要的run time和space complexity,逐一跟面试官沟通。当然,绝大多数的情况下,他们会说yeah assume XYZ,但是要他们说了才可以,你自己瞎assume肯定会挂的。
然后尽量不要像是背的。太极拳的精华在招意,不在招式,同理,解题的精华在思维,不在代码。最好的方式莫过于现场跟面试官先讨论逻辑和数据结,然后写出一些common test cast,然后代码一边写一边说,现场找到bug并且完善,会比闷头写码秒解好很多。而且秒解非常容易招很难的Follow Up,因为面试官不确定你是否真的理解还是只是做了题。
还有就是互动非常重要,写代码的时候尽量同时解释自己的思维,为什么要加一个storage variable,为什么选择这样的subroutine,为什么用这个library里的数据结构等等,然后写完别等他们问,直接说这个Runtime和Space complexity是什么,还有什么其他的方法,那些其他方法的complexity是什么等等,显示出自己是经过考虑才选择出这样的代码结构。很多国人小朋友都觉得沟通有障碍就不说话,但是这样不是明摆着自己承认不会交流吗?要记得,花这么多时间刷题的同时也要同时在沟通上面下功夫。
最后最后,要想想test case要怎么写,这个现在经常问,想想你在刷题的时候LC会有什么样的test case卡到你,写这些test case的人当时的想法,会很有帮助。
3)System Design
这个也是沟通的环节,个人倾向是先把所有的Use Case写出来,然后写出所有会需要的component,schema和大概的API,然后在开始做设计。重点是根据每一个Use case做出相对的实现,比如这个A Use Case需要high availability,所以我选择这个技术实现,这个B Use Case需要Atomic transaction,所以我要做这样的实现。跟Coding一样,要确定好scope和其他supproting的系统,比如Facebook/Linkedin经常问News Feed,你要问我需不需要考虑Relevance,sorting,context等等,大概率是不需要,但是你要展示出你在思考这些问题。然后Scope也要问清楚,这个东西的User是谁,deliverable是什么,我们需不要handle infrastructure scaling,需不需要handle各种UGC storage,后台的partition tolerance和load balancing和data duplication等等。一般情况下main design部分都会让你skip,然后选一两个比较精的部分问follow up,所以当你问这些scope的同事,心里面也该有个大概的底应该要如何实现。
4)BQ
BQ应该是最重要的环节,前面说了,会写码的人很多,能解决问题的人很少,能带领团队解决问题的人少之又少。这里所有BQ的问题都是为了验证3点。
a)你有没有problem solving skills?你解决问题有没有一定的策略,有没有办法确保相同的问题不会发生,有没有办法确保其他人不犯相同的错误,碰到自己没法解决的问题如何处理,自己直接导致的问题会如何处理,如何面对多个stakeholder不一致的方向及要求等等
b)你有没有leadership skills?团队有问题的时候你会怎么帮忙?遇到bug你是只修bug还是能深究问题并且surface给management,能不能在团队有困难时go above and beyond,能不能有效的沟通并且解决矛盾,在沟通的时候有没有对他人立场的认知和理解,并且就这个理解给出对他人最有用的答案等等
c)你有没有self awareness?你对自己的期许是什么,你最强的能力是什么,你在什么情况下会under perform,你明不明白自己在这个group里能起到多大的作用等等
面试官问的所有傻屌问题想要的答案都是你有没有一些上述的quality,而你要做的就是好好嗦发。一个好答案分成起承转合。
起:历史背景,为什么有这样的情况,其他人为什么没管,这个情况的consequence是什么
承:讨论自己的思考过程,为什么最后选择了这种方法解决问题,其他没有选择的方案有什么pros and cons
转:具体解决问题的时候遇到了什么样的困难,如何克服,学到了什么
合:最后结果,问题是否完美解决,后续有什么follow up,是否给你的org或者group带来了正面的影响等等
讲的时候多观察面试官,感觉他有问题的时候可以停一下,如果有什么笑点的时候也可以停一下缓和气氛(例如策划经常该需求,android native各种坑,samsung的OS多他妈傻逼之类的)。
5)Time to ask questions
一般情况下,能把问题答完都至少会pass,但是要有strong feedback你短短的几分钟问答就会很重要。我个人喜欢的问题是问Tech culture,比如我在用别的组的系统,发现不能实现我想做的功能,如果要加入这个功能会否给我这样的自由度,其他组会不会不高兴,将来的ownership和maintenence会如何分配,或者我会问有没有一些centralized的文档库,或者central services org,比如你之前碰到过的问题,花了很长时间才找到答案,我将来如果入职也遇到相同的问题会不会也需要花一样久的时间去找这些答案。如果对他们的业务不熟,也可以就问面试官他的经历,他来这儿几年,在那些组干过,具体业务是什么,觉不觉得有继续学习的深度和广度(要凸显自己热爱学习新技术),如果跟management提出想要跳出comfort zone会不会有阻力等等。尽量开始一个问答对话,尽量让对方感觉亲切。
最后希望所有同学都能找到自己心仪的offer!
Subscribe to:
Posts (Atom)
