摘要:
矩阵转置,很复杂嘛?为嘛我跟面试官说对于m×n的矩阵,定义一个n×m的矩阵,然后逐行拷贝新矩阵的列就搞定,有问题?有问题?为啥要问那么多次? package hangxin; public class Juzhenzhuanzhi { public static int[][] matrixTran 阅读全文
摘要:
https://leetcode-cn.com/problems/find-the-town-judge/ 我只会写一些垃圾代码: class Solution { public int findJudge(int n, int[][] trust) { class NodeMap { int re 阅读全文
摘要:
https://leetcode-cn.com/problems/first-unique-character-in-a-string/ 一直都写着没有灵魂的代码 class Solution { public int firstUniqChar(String s) { if(s.length() 阅读全文
摘要:
https://leetcode-cn.com/problems/design-hashset/ 我会写一些无脑得代码 class MyHashMap { class Node { int key; int value; Node(int key, int value) { this.key = k 阅读全文