摘要:
题目: The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return 阅读全文
摘要:
题目: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed f 阅读全文
摘要:
题目: Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in 阅读全文
摘要:
题目: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would hav 阅读全文
摘要:
题目: Given an array of integers, every element appears three times except for one. Find that single one. Your algorithm should have a linear runtime co 阅读全文
摘要:
A、 good and abc B、 good and gbc C、 test ok and abc D、 test ok and gbc 答案:B 解析:我也像很多人一样,上了就像选D。但敲到eclipse中试了下,的确输出B。很神奇!百度了一下,这就是所谓的java只有值传递,没有引用传递。 就 阅读全文