上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 44 下一页
摘要: Write a function that takes a string as input and reverse only the vowels of a string. Example 1:Given s = "hello", return "holle". Example 2:Given s 阅读全文
posted @ 2016-04-24 12:07 Grandyang 阅读(10151) 评论(2) 推荐(0) 编辑
摘要: 17.6 Given an array of integers, write a method to find indices m and n such that if you sorted elements m through n, the entire array would be sorted 阅读全文
posted @ 2016-04-23 15:52 Grandyang 阅读(695) 评论(0) 推荐(0) 编辑
摘要: Write a function that reverses a string. The input string is given as an array of characters char[]. Do not allocate extra space for another array, yo 阅读全文
posted @ 2016-04-22 12:38 Grandyang 阅读(13646) 评论(6) 推荐(0) 编辑
摘要: 17.5 The Came of Master Mind is played as follows: The computer has four slots, and each slot will contain a ball that is red (R), yellow (Y), green ( 阅读全文
posted @ 2016-04-22 10:28 Grandyang 阅读(941) 评论(0) 推荐(0) 编辑
摘要: 17.4 Write a method which finds the maximum of two numbers. You should not use if-else or any other comparison operator. 这道题让我们找出两个数中的较大值,不能用if..else. 阅读全文
posted @ 2016-04-21 10:33 Grandyang 阅读(485) 评论(0) 推荐(0) 编辑
摘要: Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum pro 阅读全文
posted @ 2016-04-20 11:35 Grandyang 阅读(17904) 评论(16) 推荐(2) 编辑
摘要: LeetCode上的原题,讲解请参见我之前的博客Factorial Trailing Zeroes。 解法一: 解法二: CareerCup All in One 题目汇总 阅读全文
posted @ 2016-04-20 10:22 Grandyang 阅读(613) 评论(0) 推荐(0) 编辑
摘要: 17.2 Design an algorithm to figure out if someone has won a game oftic-tac-toe. 这道题让我们判断玩家是否能赢井字棋游戏,有下面几点需要考虑: 1. 判断是否能赢hasWon函数是调用一次还是多次,如果是多次,我们可能为了 阅读全文
posted @ 2016-04-19 11:07 Grandyang 阅读(2647) 评论(0) 推荐(0) 编辑
摘要: 【原创短片】(Theatrical Shorts)16部 《安德鲁和威利冒险记》《顽皮跳跳灯》《红色的梦》《锡铁小兵》《小雪人大行动》《棋逢敌手》《鸟!鸟!鸟!》《跳跳羊》《光杆乐队》《绑架课》《魔术师和兔子》《暴力云与送子鹳》《昼与夜》《月神》《蓝雨伞之恋》《岩浆》 【动画长片衍生篇】(Home 阅读全文
posted @ 2016-04-19 06:25 Grandyang 阅读(1667) 评论(0) 推荐(0) 编辑
摘要: In Maya 2015, we usually use mental ray to render our model, some new users may not see the mental ray item, that is because you have not loaded it ye 阅读全文
posted @ 2016-04-19 04:18 Grandyang 阅读(338) 评论(0) 推荐(0) 编辑
摘要: Given an integer (signed 32 bits), write a function to check whether it is a power of 4. Example 1: Example 2: Input: 5 Output: false Example 2: Follo 阅读全文
posted @ 2016-04-18 11:31 Grandyang 阅读(14721) 评论(5) 推荐(0) 编辑
摘要: 我们在使用Maya软件的时候,有时候需要把语言在中英文之间切换,目前我感觉在不用插件的情况下,下面两种方法可以比较容易的做到: 方法一: 右键我的电脑属性,高级系统设置里面找到环境变量面板,然后新建一个环境变量,名字为 MAYA_UI_LANGUAGE,变量值设为en_US就是英文,设为zh_CN就 阅读全文
posted @ 2016-04-18 06:27 Grandyang 阅读(11349) 评论(0) 推荐(0) 编辑
摘要: 17.1 Write a function to swap a number in place (that is, without temporary variables). 这道题让我们交换两个数,但是不能用额外空间,那么我们可以先做差值,存入a中,然后再加上b,存入b中,那么此时的b即为原来的a 阅读全文
posted @ 2016-04-18 00:39 Grandyang 阅读(808) 评论(0) 推荐(0) 编辑
摘要: 16.6 You are given a class with synchronized method A and a normal method B. If you have two threads in one instance of a program, can they both execu 阅读全文
posted @ 2016-04-17 12:17 Grandyang 阅读(497) 评论(0) 推荐(0) 编辑
摘要: 16.5 Suppose we have the following code:public class Foo { public Foo() { . . . } public void first() { ... } public void second() { ... } public void 阅读全文
posted @ 2016-04-17 11:41 Grandyang 阅读(615) 评论(0) 推荐(0) 编辑
摘要: Maya中mentalray灯光渲染终极训练视频教程 http://www.cgtsj.com/cg/f/vx3627/index.html Maya无人机建模制作训练视频教程第一季 http://www.cgtsj.com/cg/f/vx3626/index.html Maya动作捕捉关键帧技术视 阅读全文
posted @ 2016-04-17 06:02 Grandyang 阅读(6775) 评论(0) 推荐(1) 编辑
摘要: 16.4 Design a class which provides a lock only if there are no possible deadlocks. 有很多方法可以避免死锁的发生,一个常用的方法是列出所需要的锁,然后判断锁上这些锁后会不会发生死锁,比如有如下的锁的顺序: A = {1 阅读全文
posted @ 2016-04-16 23:45 Grandyang 阅读(871) 评论(0) 推荐(0) 编辑
摘要: 16.3 In the famous dining philosophers problem, a bunch of philosophers are sitting around a circular table with one chopstick between each of them. A 阅读全文
posted @ 2016-04-15 11:08 Grandyang 阅读(3894) 评论(0) 推荐(0) 编辑
摘要: 16.2 How would you measure the time spent in a context switch? 上下文转换发生在两个进程之间,比如让一个等待进程进入执行和让一个运行进程进入等待,这些在多任务中发生。操作系统需要把等待进程的信息放入内存和把当前运行的进程信息保存下来。为了 阅读全文
posted @ 2016-04-14 09:41 Grandyang 阅读(726) 评论(0) 推荐(0) 编辑
摘要: Given a text file file.txt that contains list of phone numbers (one per line), write a one liner bash script to print all valid phone numbers. You may 阅读全文
posted @ 2016-04-13 23:43 Grandyang 阅读(5905) 评论(2) 推荐(0) 编辑
摘要: Write a bash script to calculate the frequency of each word in a text file words.txt. For simplicity sake, you may assume: words.txt contains only low 阅读全文
posted @ 2016-04-13 11:33 Grandyang 阅读(7027) 评论(1) 推荐(1) 编辑
摘要: 16.1 What's the difference between a thread and a process? 进程Process是程序执行时的一个实例。一个进程是被分配系统资源的独立单元,每个进程在独立的地址空间上执行,如果需要使用其他进程的资源,需要使用进程间通讯,包括管道Pipes,文件 阅读全文
posted @ 2016-04-13 05:27 Grandyang 阅读(654) 评论(0) 推荐(0) 编辑
摘要: Given a text file file.txt, transpose its content. You may assume that each row has the same number of columns and each field is separated by the ' '  阅读全文
posted @ 2016-04-12 12:26 Grandyang 阅读(4264) 评论(0) 推荐(0) 编辑
摘要: 15.7 Imagine a simple database storing information for students' grades. Design what this database might look like and provide a SQL query to return a 阅读全文
posted @ 2016-04-12 03:15 Grandyang 阅读(866) 评论(0) 推荐(0) 编辑
摘要: How would you print just the 10th line of a file? For example, assume that file.txt has the following content: Your script should output the tenth lin 阅读全文
posted @ 2016-04-11 06:12 Grandyang 阅读(5015) 评论(0) 推荐(0) 编辑
摘要: The Trips table holds all taxi trips. Each trip has a unique Id, while Client_Id and Driver_Id are both foreign keys to the Users_Id at the Users tabl 阅读全文
posted @ 2016-04-10 12:47 Grandyang 阅读(4912) 评论(6) 推荐(0) 编辑
摘要: Given a Weather table, write a SQL query to find all dates' Ids with higher temperature compared to its previous (yesterday's) dates. For example, ret 阅读全文
posted @ 2016-04-09 13:08 Grandyang 阅读(5444) 评论(1) 推荐(0) 编辑
摘要: Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails based on its smallest Id. For example, aft 阅读全文
posted @ 2016-04-09 11:35 Grandyang 阅读(6797) 评论(0) 推荐(0) 编辑
摘要: The Employee table holds all employees. Every employee has an Id, and there is also a column for the department Id. The Department table holds all dep 阅读全文
posted @ 2016-04-08 13:21 Grandyang 阅读(6317) 评论(1) 推荐(1) 编辑
摘要: The Employee table holds all employees. Every employee has an Id, a salary, and there is also a column for the department Id. The Department table hol 阅读全文
posted @ 2016-04-08 07:24 Grandyang 阅读(5121) 评论(1) 推荐(0) 编辑
摘要: 15.6 Draw an entity-relationship diagram for a database with companies, people, and professionals (people who work for companies). 在公司Companies工作的人是专家 阅读全文
posted @ 2016-04-07 07:16 Grandyang 阅读(851) 评论(0) 推荐(0) 编辑
摘要: 15.5 What is denormalization? Explain the pros and cons. 逆规范化Denormalization是一种通过添加冗余数据的数据库优化技术,可以帮助我们减少关系数据库中耗时的交Join。在一般的规范化的数据库中,我们将数据存在不同的表中是为了减少冗 阅读全文
posted @ 2016-04-07 06:57 Grandyang 阅读(1170) 评论(0) 推荐(0) 编辑
摘要: Suppose that a website contains two tables, the Customers table and the Orders table. Write a SQL query to find all customers who never order anything 阅读全文
posted @ 2016-04-07 06:41 Grandyang 阅读(3093) 评论(1) 推荐(0) 编辑
摘要: Write a SQL query to find all duplicate emails in a table named Person. For example, your query should return the following for the above table: Note: 阅读全文
posted @ 2016-04-07 06:09 Grandyang 阅读(3839) 评论(0) 推荐(0) 编辑
摘要: Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list -- whose elements may also be integ 阅读全文
posted @ 2016-04-06 12:41 Grandyang 阅读(21315) 评论(3) 推荐(0) 编辑
摘要: 15.4 What are the different types of joins? Please explain how they differ and why certain types are better in certain situations. Join是用来联合两个表的,每个表至少 阅读全文
posted @ 2016-04-05 12:13 Grandyang 阅读(716) 评论(0) 推荐(0) 编辑
摘要: The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id. Given the Em 阅读全文
posted @ 2016-04-05 11:21 Grandyang 阅读(3855) 评论(0) 推荐(1) 编辑
摘要: Write a SQL query to find all numbers that appear at least three times consecutively. For example, given the above Logs table, 1 is the only number th 阅读全文
posted @ 2016-04-05 10:51 Grandyang 阅读(6332) 评论(0) 推荐(0) 编辑
摘要: Write a SQL query to rank scores. If there is a tie between two scores, both should have the same ranking. Note that after a tie, the next ranking num 阅读全文
posted @ 2016-04-04 11:20 Grandyang 阅读(14125) 评论(17) 推荐(0) 编辑
摘要: Building #11 is undergoing a major renovation. Implement a query to close all requests from apartments in this building. -- TABLE Apartments -- TABLE 阅读全文
posted @ 2016-04-04 09:18 Grandyang 阅读(504) 评论(0) 推荐(0) 编辑
上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 44 下一页
Fork me on GitHub