摘要: A proper vertex coloring is a labeling of the graph's vertices with colors such that no two vertices sharing the same edge have the same color. A colo 阅读全文
posted @ 2021-03-08 22:31 coderJ_ONE 阅读(36) 评论(0) 推荐(0) 编辑
摘要: A registration card number of PAT consists of 4 parts: the 1st letter represents the test level, namely, T for the top level, A for advance and B for 阅读全文
posted @ 2021-03-08 22:25 coderJ_ONE 阅读(73) 评论(0) 推荐(0) 编辑
摘要: The "travelling salesman problem" asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shor 阅读全文
posted @ 2021-03-08 22:13 coderJ_ONE 阅读(32) 评论(0) 推荐(0) 编辑
摘要: When shipping goods with containers, we have to be careful not to pack some incompatible goods into the same container, or we might get ourselves in s 阅读全文
posted @ 2021-03-08 21:58 coderJ_ONE 阅读(47) 评论(0) 推荐(0) 编辑
摘要: Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game, player #1 阅读全文
posted @ 2021-03-08 21:51 coderJ_ONE 阅读(70) 评论(0) 推荐(0) 编辑
摘要: In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the 阅读全文
posted @ 2021-03-08 21:46 coderJ_ONE 阅读(37) 评论(0) 推荐(0) 编辑
摘要: This is a problem given in the Graduate Entrance Exam in 2018: Which of the following is NOT a topological order obtained from the given directed grap 阅读全文
posted @ 2021-03-08 21:20 coderJ_ONE 阅读(30) 评论(0) 推荐(0) 编辑
摘要: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining. Exampl 阅读全文
posted @ 2021-03-08 21:06 coderJ_ONE 阅读(45) 评论(0) 推荐(0) 编辑
摘要: Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen nu 阅读全文
posted @ 2021-03-08 20:55 coderJ_ONE 阅读(32) 评论(0) 推荐(0) 编辑
摘要: You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists into one sorted linked-list 阅读全文
posted @ 2021-03-08 20:50 coderJ_ONE 阅读(38) 评论(0) 推荐(0) 编辑
摘要: Given the head of a linked list, remove the nth node from the end of the list and return its head. Follow up: Could you do this in one pass? Example 1 阅读全文
posted @ 2021-03-08 20:36 coderJ_ONE 阅读(35) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the thr 阅读全文
posted @ 2021-03-08 20:31 coderJ_ONE 阅读(28) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the s 阅读全文
posted @ 2021-03-08 20:26 coderJ_ONE 阅读(30) 评论(0) 推荐(0) 编辑
摘要: Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Exampl 阅读全文
posted @ 2021-03-08 19:42 coderJ_ONE 阅读(33) 评论(0) 推荐(0) 编辑
摘要: Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, 2 is 阅读全文
posted @ 2021-03-08 19:36 coderJ_ONE 阅读(39) 评论(0) 推荐(0) 编辑
摘要: Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, 2 is 阅读全文
posted @ 2021-03-08 19:25 coderJ_ONE 阅读(34) 评论(0) 推荐(0) 编辑
摘要: Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer (similar to C/C++'s atoi function). The algorithm for myAt 阅读全文
posted @ 2021-03-08 19:20 coderJ_ONE 阅读(36) 评论(0) 推荐(0) 编辑
摘要: Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-23 阅读全文
posted @ 2021-03-08 19:02 coderJ_ONE 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 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 font 阅读全文
posted @ 2021-03-08 18:28 coderJ_ONE 阅读(36) 评论(0) 推荐(0) 编辑
摘要: Given a string s, return the longest palindromic substring in s. Example 1: Input: s = "babad" Output: "bab" Note: "aba" is also a valid answer. Examp 阅读全文
posted @ 2021-03-08 17:57 coderJ_ONE 阅读(36) 评论(0) 推荐(0) 编辑