Skip to content

Instantly share code, notes, and snippets.

View foreverpersist's full-sized avatar
🎯
Focusing

Joy Allen foreverpersist

🎯
Focusing
  • Huazhong University of Science and Technology (HUST)
  • China
View GitHub Profile
@touilleMan
touilleMan / SimpleHTTPServerWithUpload.py
Last active May 4, 2024 01:08 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload - Python3 version
#!/usr/bin/env python3
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
see: https://gist.github.com/UniIsland/3346170
"""
@sing1ee
sing1ee / gist:5971946
Last active March 27, 2024 06:37
Google面试题:扔鸡蛋问题

Google面试题:扔鸡蛋问题

原题描述

两个软硬程度一样但未知的鸡蛋,它们有可能都在一楼就摔碎,也可能从一百层楼摔下来没事。有座100层的建筑,要你用这两个鸡蛋通过最少的次数确定哪一层是鸡蛋可以安全落下的最高位置。可以摔碎两个鸡蛋

方法分析

看到这个题目,最保险的方法就是一层一层试验,但这样只需要一个鸡蛋就可以了。我们现在有两个鸡蛋,完全可以用有更快的方法。