So, let's jump in and write a function.
那么让我们投入进去,开始编写函数吧。
Next, write a function to display the posts in the blog.
接下来,编写一个函数显示blog中的这些post。
Using a "static" approach, we can write a function like.
使用“静态”方法,可以编写如下的函数。
Write a function to find the depth of a binary tree.
写个程序找到一个二叉树的深度。
Write a function that calculates a number's factorial using recursion.
写出一个用递归来计算阶乘的函数。
The idea is to write a function to minimize calls to it from other code.
编写函数时的主要思想是,尽量减少从其它代码对其的调用。
But for now, think of this as just another way to write a function call.
但是现在,把这当成是写函数,调用的另外一种方式就行了。
Write a function that draws a similar grid with four rows and four columns.
写一个四行四列的小网格绘制的程序。
Given two binary trees, write a function to check if they are equal or not.
题目大意:给定两个二叉树,判断两者是否是相同的二叉树。即结构相同且对应节点的值也相同。
To get a timer to work in an infinite loop, we must write a function that calls itself.
要得到一个无限循环的记时器,我们必须写出一个自我调用的函数。
Because we cannot copy an array, we cannot write a function that takes an array type parameter.
因为数组不能复制,所以无法编写使用数组类型形参的函数。
Given such a graph, write a function to find all the MHTs and return a list of their root labels.
给定一个无向图,编写函数找出所有的最小高度树,并返回其根标号的列表。
Write a function to determine whether you can win the game given the number of stones in the heap.
写一个函数,对与一个给定的石头数目,算出你是否可以赢得这场比赛。
Please write a function to merger the two lists together to obtain a new nondecreasing order list.
请写一个函数来合并两表一起获得新秩序不减名单。
Even though we cannot pass an array directly, we can write a function parameter that looks like an array.
虽然不能直接传递数组,但是函数的形参可以写成数组的形式。
An alternative is to write a function that fetches only the immediate dependency list for a user-selected plug-in.
另外一种选择是编写一个函数,只获取用户选择的插件的直接依赖性清单。
As an exercise, write a function that takes a string as an argument and displays the letters backward, one per line.
下面就练习一下了,写一个函数,接收一个字符串做参数,然后倒序显示每一个字符,每行显示一个。
It's fairly easy to write a function in assembly that is call-able from c, so using both languages wasn't a problem.
而从C里调用汇编写的函数是相当简单的,因此同时使用两种语言不成问题。
For example, let's say your project requires you to write a function that adds two Numbers, and returns the sum of these Numbers.
例如:你的项目需要你写一个函数,把两个数相加,并返回和。
And what's this little loop say to do? This little loop says I'm going to write a function or procedures that takes in two messages.
这个小循环是做什么的,这个小的循环是,我要写一个函数或者过程来接受两条消息。
Common theme asks to write a function in order to realize some function, function name and parameter also can be given commonly.
一般题目都要求编写一个函数以实现某功能,函数名称和参数一般也会给定。
For example, let's say your project requires you to write a function that adds two Numbers, and returns the sum of these Numbers.
比如说,假设你的项目要求你写一个函数把两个数字相加,并返回两个数字的和。
You might want to write a function that takes a word and computes a list of all the words that can be formed by removing one letter.
你也许需要写一个函数,接收一个单词然后计算一下这个单词去掉一个字母能得到单词组成的列表。
Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.
输入一个数字列表,我们要把所有的0元后置,并要保持非0元的原顺序。
Then I'm going to write a function ans quest called answer question, or ans quest, designed to actually address the original question.
然后我将要编写一个,叫回答问题的函数,或者说是,目的是,解决原始问题。
I'd also like to show you an example of how you'd set up your plug-in architecture if you decided to write a function, as opposed to a method.
如果您决定编写函数而不是方法,我还将向您展示一个样例,介绍如何设置插件架构。
Write a function to shift all four counters, calling two functions for shifting three counters, and one function for shifting one counter.
写一个函数来转移所有四个筹码,调用两个函数来转移三个筹码,并且用一个函数来转移一个筹码。
We want to write a function that given a function to compute the sum of a sequence, gives us the next function to compute the sum of a sequence.
我们要编写一个返回另一个函数的函数,用返回的函数计算对序列求和。
We want to write a function that given a function to compute the sum of a sequence, gives us the next function to compute the sum of a sequence.
我们要编写一个返回另一个函数的函数,用返回的函数计算对序列求和。
应用推荐