摘要: int[] source = { 5, -3, 6, -7, -6, 1, 8, -4, 0, 0 };int toRightIdx = 0;int toLeftIdx = source.Length - 1;int leftIdx = 0;int rightIdx = source.Length - 1;int[] result = new int[source.Length];while (true){ if (toLeftIdx >= 0) { int left = source[toRightIdx++]; if (left < 0) resul... 阅读全文
posted @ 2011-09-19 09:10 ahui 阅读(525) 评论(0) 推荐(0) 编辑