zoukankan
html css js c++ java
Union Two Lists
class
Data_structure
{
public
static
void
Main()
{
int
[]la
=
{
3
,
5
,
8
,
11
}
;
int
[]lb
=
{
2
,
6
,
8
,
9
,
11
,
15
,
20
}
;
int
[]lc
=
new
int
[
11
];
int
i
=
0
,j
=
0
,k
=
0
;
while
(i
<
la.Length
&&
j
<
lb.Length)
{
if
(la[i]
<=
lb[j])
{
lc[k
++
]
=
la[i
++
];
}
else
{
lc[k
++
]
=
lb[j
++
];
}
}
while
(i
<
la.Length)
{
lc[k
++
]
=
la[i
++
];
}
while
(j
<
lb.Length)
{
lc[k
++
]
=
lb[j
++
];
}
foreach
(
int
element
in
lc)
Console.Write(element
+
"
\t
"
);
Console.Read();
}
}
查看全文
相关阅读:
Android 动画-alpha(渐变透明度动画效果)
Memento(备忘录)
Mediator(中介者)
Iterator(迭代器)
Command(命令)
Chain of Responsibility(责任链)
Template Method(模板方法)
Interpreter(解释器)
Proxy(代理)
Flyweight(享元)
原文地址:https://www.cnblogs.com/gmq/p/513182.html
最新文章
鼠标经过, 选中文字
canvas
canvas
monogdb 安装
理解字符串 Boyer-Moore 算法
玉伯 对 前端的 金玉良言
React 实现 Table 的思考
sqlSQL2008如何创建定时作业
SQL Server GOTO使用实例详解
scrapy_数据收集
热门文章
scrapy_cookie禁用_延迟下载_自定义爬虫setting
scrapy_随机ip代理池
scrapy_随机user-agent
scrapy_Response and Request
爬虫_vs_反爬虫
scrapy_全站爬取
Python-装饰器(语法糖)
爬取西刺网代理ip,并把其存放mysql数据库
requests_模拟登录知乎
jquery插件
Copyright © 2011-2022 走看看