Hasty Briefsbeta

双语

A software engineering interview question I like: computing the median

2 days ago
  • #Python programming
  • #algorithm implementation
  • #technical interviews
  • 本文讨论了一种技术面试方法,采用直接问题配合深入探讨角度,以中位数函数为例加以说明。
  • Python中位数函数的实现包含对空列表的错误处理,并使用sorted()以避免修改原始列表。
  • 高质量候选人即使在检查奇偶性等简单任务中也依赖库函数,且该函数对奇数和偶数长度列表分别采用不同方法计算中位数。