堆栈(Stack)代表了一个后进先出的对象集合。
using System;
using System.Collections;
namespace CollectionsApplication
{
class Program
{
static void Main(string[] args)
{
Stack st =...
队列(Queue)代表了一个先进先出的对象集合。
using System;
using System.Collections;
namespace CollectionsApplication
{
class Program
{
static void Main(string[] args)
{
Queue q = ...
package pack;import java.io.File;
import java.io.FilenameFilter;public class Main { public static void sys(Object obj) {
System.out.println(obj);
} public static void main(String[] ar...
分类:
编程语言 时间:
2015-05-06 23:01:56
阅读次数:
267
Python中字符串查找方式有多种,常见的有re.match/search
or str.find
用一个例子来说明各种方式的效率如下:
from timeit import timeit
import re
def find(string, text):
if string.find(text) > -1:
pass
def re_find(string, t...
分类:
编程语言 时间:
2015-05-06 22:59:55
阅读次数:
247
//计算数组中最大值,最小值,平均值和总和 //类中main最先执行 static void Main(string[] args) { //声明一个数组,数组长度一定固定就不能更改了 int[] nums = {...
分类:
编程语言 时间:
2015-05-06 22:39:47
阅读次数:
134
static void Main(string[] arr) { int[] names = {4,2,5,7,6,8,9,1,3,0};//Array.Sort(names)数组排序 for (int i = 0; i n...
分类:
编程语言 时间:
2015-05-06 22:39:00
阅读次数:
128
作为一门专为程(yu)序(fa)员(tang)考虑的语言,感受一下来自微软的满满的恶意...1. 字符串内联在之前的版本中,常用的格式化字符串:var s = String.Format("{0} is {1} year{{s}} old", p.Name, p.Age);在 C# 6 中://无格...
1:student、course类package JDBCU;public class Student { private String no; private String name; public String getNo() { return no; ...
分类:
数据库 时间:
2015-05-06 22:30:55
阅读次数:
380
static void Main(string[] arr) { string[] names = { "老杨1", "老李2", "老王3", "老牛4", "老虎5", "老磁6" }; for (int i = 0; i < names...
分类:
编程语言 时间:
2015-05-06 22:26:02
阅读次数:
148
Multiply Strings
Given two numbers represented as strings, return multiplication of the numbers as a string.
Note: The numbers can be arbitrarily large and are non-negative.
解题思路:
按照小学的做法,每位...
分类:
其他好文 时间:
2015-05-06 21:16:09
阅读次数:
118