摘要:
Fraction to Recurring DecimalGiven two integers representing the numerator and denominator of a fraction, return the fraction in string format.If the ... 阅读全文
摘要:
在Unity3D中,有时候我们需要计算二维向量的夹角。二维向量夹角一般在0~180度之前,可以直接调用Vector2.Angle(Vector2 from, Vector2 to)来计算。但是在有些场景,我们需要-180~180度的夹角,此时可以用下面的脚本进行计算:1 float Vect... 阅读全文
摘要:
Partition ListGiven a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should pres... 阅读全文
摘要:
Binary Tree Zigzag Level Order TraversalGiven a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then... 阅读全文