406. Queue Reconstruction by Height
来源:互联网 发布:半月板损伤 知乎 编辑:程序博客网 时间:2024/06/16 22:42
public class Solution { public int[][] reconstructQueue(int[][] people) { Arrays.sort(people,new Comparator<int[]>(){ public int compare(int[] a1,int[] a2){ return a1[0]!=a2[0]?a2[0]-a1[0]:a1[1]-a2[1]; } }); ArrayList<int[]> res=new ArrayList<int[]>(); for(int[] cur:people){ res.add(cur[1], cur); } return res.toArray(new int[people.length][]); }}
1 0
- 406. Queue Reconstruction by Height
- 406. Queue Reconstruction by Height
- 406. Queue Reconstruction by Height
- 406. Queue Reconstruction by Height
- 406. Queue Reconstruction by Height
- 406. Queue Reconstruction by Height
- 406. Queue Reconstruction by Height
- 406. Queue Reconstruction by Height
- 406. Queue Reconstruction by Height
- 406. Queue Reconstruction by Height
- 406. Queue Reconstruction by Height
- 406. Queue Reconstruction by Height
- 406. Queue Reconstruction by Height
- 406. Queue Reconstruction by Height
- 406. Queue Reconstruction by Height
- 406. Queue Reconstruction by Height
- 406. Queue Reconstruction by Height
- 406. Queue Reconstruction by Height
- 用css来设置div的样式
- 软件开发方法
- spa单页的优缺点
- Activity全面解析
- 前置声明与C++头文件互相包含导致的error: 'xxx' does not name a type问题
- 406. Queue Reconstruction by Height
- Target runtime Tomcat v6.0 is not defined错误解决方法
- UFT试用版重置
- Objective-C中的instancetype和id区别
- 获取TrustedInstaller权限
- ObjectAnimator
- Activity之间的数据传递方式
- 设置robot百度收不收录
- OpenGL,glut,glew,glfw,mesa等