Coder Social home page Coder Social logo

coding-interview-python's Introduction

Coding Interview

Build Status Coverage Status

《剑指 Offer》中的面试题解决方案汇总,相关实现使用 Python 3.6 完成,使用 pytest 作为单元测试工具,coverage 提供测试覆盖率报告。

目录

数据结构

  1. 队列
  2. 双端队列
  3. 单向链表

排序算法

  1. 冒泡排序:bubble_sort
  2. 选择排序:selection_sort
  3. 插入排序:insertion_sort
  4. 希尔排序:shell_sort
  5. 归并排序:merge_sort
  6. 堆排序:heap_sort
  7. 快速排序:quick_sort

经典问题

  1. 求链表中的倒数第 k 个节点
  2. 找出数组中重复的数字
  3. 不修改数组找出重复的数字
  4. 二维数组查找
  5. 字符串空格替换
  6. 有序列表合并
  7. 倒序打印链表
  8. 使用两个栈构建队列
  9. 使用两个队列构建栈
  10. 计算斐波那契数列
  11. 员工年龄排序
  12. 旋转数组的最小数字
  13. 矩阵中的路径
  14. 机器人的活动范围
  15. 剪绳子
  16. 二进制中 1 的个数
  17. 数值的整数次方
  18. 删除链表的节点
  19. 删除链表中重复的节点
  20. 正则表达式匹配
  21. 调整数组顺序使奇数位于偶数前面
  22. 链表中环的入口节点
  23. 链表反转
  24. 合并两个排序链表
  25. 顺时针打印矩阵
  26. 包含 min 函数的栈
  27. 栈的压入、弹出序列
  28. 数组中出现次数超过一半的数字
  29. 最小的 k 个数
  30. 数据流的中位数
  31. 连续子数组的最大和
  32. 1~n 整数中 1 出现的次数
  33. 最长不重复子串
  34. 丑数
  35. 第一个只出现一次的字符
  36. 两个链表的第一个公共节点
  37. 在排序数组中查找数字
  38. 0~n-1 中缺失的数字
  39. 数组中数值和下标相等的元素
  40. 和为 s 的数字
  41. 滑动窗口的最大值
  42. 队列的最大值

coding-interview-python's People

Contributors

ifaceless avatar

Stargazers

 avatar  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.