"Sword-pointing Offer" Java version full series of questions (2021 version, continuous update!)
This series records the latest version"Sword to Offer"The solution process and code of the problem, because the original book is in C language. Here we use Java code to reproduce and optimize, and include problem-solving analysis.
I hope you can like and collect it! Follow me!Updated daily!
2021.4.24 Finished
If you are preparing for a Java interview, you can check out another article of mine!Java interview review system summary (2021 edition, continuous update)
CSSDN problem solution (including detailed analysis process, code) | Likou link |
---|---|
Sword-pointing to the Offer series (java version, detailed analysis) 03. Repeated numbers in the array | Sword to Offer 03. Repeated numbers in array |
Sword-pointing the Offer series (java version, detailed analysis) 04. Search in two-dimensional arrays | Search in a 2D array |
Sword-pointing Offer series (java version, detailed analysis) 05. Replace spaces | Replace spaces |
Sword-pointing Offer series (java version, detailed analysis) 06. Print link list from end to end | Print link list from end to end |
Sword-pointing the Offer series (java version, detailed analysis) 07. Rebuilding the binary tree | Rebuilding a binary tree |
Sword to the Offer series (java version, detailed analysis) 08. The next node of the binary tree | none |
Sword-pointing Offer series (java version, detailed analysis) 09. Use two stacks to implement queues | Implement queues with two stacks |
Sword-pointing Offer series (java version, detailed analysis) 10. Fibonacci series | Fibonacci sequence |
Sword-pointing Offer series (java version, detailed analysis) 11. Rotate the minimum number of the array | The minimum number of rotation array |
Sword to the Offer series (java version, detailed analysis) 12. Path in the matrix | Paths in the matrix |
Sword-pointing Offer series (java version, detailed analysis) 13. Robot motion range | Robot's range of motion |
Sword-pointing Offer series (java version, detailed analysis) 14. Clip rope | Rope cutter |
Sword-pointing the Offer series (java version, detailed analysis) 15. Number of 1 in binary | The number of 1 in binary |
Sword to Offer series (java version, detailed analysis) 16. Integer power of numerical values | The integer power of the value |
Sword-pointing Offer series (java version, detailed analysis) 17. Print the number of n-digits from 1 to the maximum | Print the number of n digits from 1 to maximum |
Sword-to-find Offer series (java version, detailed analysis) 18. Delete linked list nodes | Delete the nodes of the linked list |
Sword-pointing the Offer series (java version, detailed analysis) 19. Regular expression matching | Regular expression matching |
Sword-pointing Offer series (java version, detailed analysis) 20. String representing numerical values | A string representing a value |
Sword-pointing Offer series (java version, detailed analysis) 21. Adjust the order of the array so that odd numbers are in front of even numbers | Adjust the order of the array so that odd numbers are ahead of even numbers |
Sword to the Offer series (java version, detailed analysis) 22. The K-last node in the linked list | The k-th last node in the linked list |
Sword-to-find series (java version, detailed analysis) 24. Reverse link list | Reverse link list |
Sword-pointing the Offer series (java version, detailed analysis) 25. Merge two sorted link tables | Merge two sorted linked lists |
Sword-pointing the Offer series (java version, detailed analysis) 26. The substructure of the tree | The substructure of the tree |
Sword-pointing the Offer series (java version, detailed analysis) 27. Mirror of binary tree | Mirror of binary tree |
Sword-pointing to the Offer series (java version, detailed analysis) 28. Symmetrical binary tree | Symmetrical binary tree |
Sword-pointing Offer series (java version, detailed analysis) 29. Print matrix clockwise | Print matrix clockwise |
Sword-pointing the Offer series (java version, detailed analysis) 30. Stack containing min functions | Stack containing min function |
Sword-pointing the Offer series (java version, detailed analysis) 31. Stack press-in and pop-up sequence | The stack press-in and pop-up sequence |
Sword-pointing Offer series (java version, detailed analysis) 32. Print binary tree from top to bottom | Print binary tree from top to bottom |
Sword-pointing Offer series (java version, detailed analysis) 33. Post-order traversal sequence of binary search tree | Post-order traversal sequence of binary search tree |
Sword to Offer series (java version, detailed analysis) 34. The path with a binary tree that is a certain value | The path with a binary tree sum of a certain value |
Sword-pointing to the Offer series (java version, detailed analysis) 35. Copying of complex linked lists | Copying complex linked lists |
Sword-pointing the Offer series (java version, detailed analysis) 36. Binary search tree and bidirectional link table | Binary search tree and bidirectional link table |
Sword-to-find Offer series (java version, detailed analysis) 37. Serialize binary tree | Serialize binary tree |
Sword-pointing the Offer series (java version, detailed analysis) 38. String arrangement | Arrangement of strings |
Sword-pointing to the Offer series (java version, detailed analysis) 39. Numbers with more than half of the occurrences in the array | Numbers that appear more than half of the times in the array |
Sword-pointing Offer series (java version, detailed analysis) 40. The minimum number of k | The smallest number of k |
Sword-pointing the Offer series (java version, detailed analysis) 41. Median number in data stream | Median number of data streams |
Sword to Offer series (java version, detailed analysis) 42. The maximum sum of continuous subarrays | The maximum sum of continuous subarrays |
Sword-pointing Offer series (java version, detailed analysis) 43. The number of times 1 appears in 1~n integer | 1~n The number of times 1 appears in integers |
Sword-pointing to the Offer series (java version, detailed analysis) 44. Numbers of a certain digit in the number sequence | A number of a certain number in a sequence of numbers |
Sword-pointing Offer series (java version, detailed analysis) 45. Arrange arrays into smallest number | Arrange arrays into smallest numbers |
Sword-pointing Offer series (java version, detailed analysis) 46. Translate numbers into strings | Translate numbers into strings |
Sword-pointing Offer series (java version, detailed analysis) 47. The greatest value of gifts | The greatest value of a gift |
Sword-pointing the Offer series (java version, detailed analysis) 48. The longest substring without duplicate characters | The longest substring without duplicate characters |
Sword-pointing Offer series (java version, detailed analysis) 49. Ugly Number | Ugly number |
Sword-pointing Offer series (java version, detailed analysis) 50. The first character that only appears once | The first character that only appears once |
Sword-pointing the Offer series (java version, detailed analysis) 51. Inverse order pairs in arrays | Inverse pairs in arrays |
Sword to the Offer series (java version, detailed analysis) 52. The first public node of the two linked lists | The first public node of two linked lists |
Sword-pointing Offer series (java version, detailed analysis) 53. Find numbers in sorted array | Find numbers in sorted arrays I |
Sword to the Offer series (java version, detailed analysis) 54. The K-largest node of the binary search tree | The kth node of the binary search tree |
Sword-pointing the Offer series (java version, detailed analysis) 55. The depth of the binary tree | The depth of the binary tree |
Sword-pointing Offer series (java version, detailed analysis) 56. Number of times the number appears in the number | Number of times a number appears in an array |
Sword-pointing the Offer series (java version, detailed analysis) 57. The number of s is | The two numbers of s |
Sword-pointing the Offer series (java version, detailed analysis) 58. Flip string | Flip word order |
Sword-pointing Offer series (java version, detailed analysis) 59. Maximum value of queue | Maximum value of queue |
Sword-pointing the offer series (java version, detailed analysis) dice points | Number of n dice points |
Sword-pointing Offer series (java version, detailed analysis) 61. The straight in playing cards | The straight in the playing cards |
Sword-pointing the Offer series (java version, detailed analysis) 62. The last remaining number in the circle | The last remaining number in the circle |
Sword-to-Offer series (java version, detailed analysis) 63. The maximum profit of stocks | The maximum profit of stocks |
Sword-pointing Offer series (java version, detailed analysis) 64. Find 1+2+…+n | Seek 1+2+…+n |
Sword-pointing Offer series (java version, detailed analysis) 65. Addition without addition, subtraction, multiplication and division | Addition without addition, subtraction, multiplication and division |
Sword-pointing the Offer series (java version, detailed analysis) 66. Build product array | Build a product array |
Sword-pointing Offer series (java version, detailed analysis) 67. Convert strings into integers | Convert strings to integers |
Sword-pointing the Offer series (java version, detailed analysis) 68. The lowest common ancestor of two nodes in the tree | The nearest public ancestor of binary search trees |
Reference knowledge in problem solving
Reference knowledge connection |
---|
Extract all digits on integers in Java, sum up digits, and two solutions! |
Java interview review system summary (2021 edition, continuous update) |