头歌 python 智慧棋盘 您所在的位置:网站首页 象棋棋盘歌 头歌 python 智慧棋盘

头歌 python 智慧棋盘

2024-06-29 19:14| 来源: 网络整理| 查看: 265

腾讯2024实习生在线笔试-0331

WZ_Richard: 大佬请问我第二题一直97%,可以帮我看看吗 public boolean[] canSorted (ListNode[] lists) { // 输入省略 int idx=0; boolean[] res = new boolean[n]; for (ListNode node : lists) { short i = 2; int pre = node.val; while (node.next!=null && i>0) { if (node.val>node.next.val) { i--; } node = node.next; } res[idx++] = i==1&&pre>node.val || i==2; } // 打印res }



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有