提交 62fb46c8 编写于 作者: M Mars Liu

add aop cases of find and max

上级 808920cb
......@@ -3,6 +3,22 @@
定义一个函数,查找给定值x在数组 array 中的索引位置,如果没有找到,返回-1 。能够在数组中找到
x 的正确位置的选项是:
## aop
### before
```java
int[] array = new int[]{1, 2, 3, 4, 5, 6, 7, 8}
```
### after
```java
System.out.println("index of %d in array is %d", findIn(array, 2));
System.out.println("index of %d in array is %d", findIn(array, 5));
System.out.println("%d not foud, search result us %d", findIn(array, 11));
```
## 答案
```java
......
......@@ -13,7 +13,9 @@ int[] array = new int[]{1, 28766, 3, 4, 75, 32421, 12, 3232, 932};
### after
```java
max(array);
```
## 答案
......
{
"node_id": "569d5e11c4fc5de7844053d9a733c5e8",
"keywords": [],
"keywords": ["逻辑运算符", "组合", "优先级"],
"children": [],
"export": []
}
\ No newline at end of file
{
"node_id": "569d5e11c4fc5de7844053d9a733c5e8",
"keywords": [],
"children": [],
"export": []
}
\ No newline at end of file
{
"node_id": "5f233292265f4ed7a9af8d54fda3054f",
"keywords": ["算术运算符", "优先级"],
"children": [],
"export": []
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册