Coder Social home page Coder Social logo

coding-interviews's Introduction

Coding-Interviews

剑指Offer(java版)

由于本人面试的是Java岗位,而剑指Offer的代码是基于C/C++/C##实现的,所以我将书中的算法用Java语言实现。

格式

每篇md我都将尽量按以下过程书写:

  1. 题目描述
  2. 测试用例
  3. 题目考点
  4. 解题思路
  5. 自己解题
  6. 参考解题
  7. 补充

面试题列表

  1. 赋值运算符函数(Java版忽略)
  2. 实现Singleton模式
  3. 数组中重复的数字
  4. 二维数组中的查找
  5. 替换空格
  6. 从尾到头打印链表
  7. 重建二叉树
  8. 二叉树的下一个节点
  9. 用两个栈实现队列
  10. 斐波那契数列
  11. 旋转数组的最小数字
  12. 矩阵中的路径
  13. 机器人的运动范围
  14. 减绳子
  15. 二进制中1的个数
  16. 数值的整数次方
  17. 打印1到最大的n位数
  18. 删除链表的节点
  19. 正则表达式匹配
  20. 表示数值的字符串
  21. 调整数组顺序使奇数位于偶数前面
  22. 链表中倒数第k个节点
  23. 链表中环的入口节点
  24. 反转链表
  25. 合并两个排序的链表
  26. 树的子结构
  27. 二叉树的镜像
  28. 对称的二叉树
  29. 顺时针打印矩阵
  30. 包含min函数的栈
  31. 栈的压入、弹出序列
  32. 从上到下打印二叉树
  33. 二叉搜索树的后序遍历序列
  34. 二叉树中和为某一值的路径
  35. 复杂链表的复制
  36. 二叉搜索树与双向链表
  37. 序列化二叉树
  38. 字符串的排列
  39. 数组中出现次数超过一半的数字
  40. 最小的k个数
  41. 数据流中的中位数
  42. 连续子数组的最大和
  43. 1~n整数中1出现的次数
  44. 数字序列中某一位的数字
  45. 把数组排成最小的数
  46. 把数字翻译成字符串
  47. 礼物的最大数值
  48. 最长不含重复字符的子字符串
  49. 丑数
  50. 第一个只出现一次的字符
  51. 数组中的逆序对
  52. 两个链表的第一个公共节点
  53. 在排序数组中查找数字
  54. 二叉搜索树的第k大节点
  55. 二叉树的深度
  56. 数组中数字出现的次数
  57. 和为s的数字
  58. 翻转字符串
  59. 队列的最大值
  60. n个骰子的点数
  61. 扑克牌中的顺子
  62. 圆圈中最后剩下的数字
  63. 股票的最大利润
  64. 求1+2+...+n
  65. 不用加减乘除做加法
  66. 构建乘积数组
  67. 把字符串转换成整数
  68. 树中两个节点的最低公共祖先

代码

大部分代码都在对应的markdown中已有呈现,这里也把平时写的代码放在了code目录下,便于使用IDE查看。其中offer2包就代表了面试题2的代码。

coding-interviews's People

Contributors

todorex avatar xinliwang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.