Files
flypythoncom.github.io/article/python-class-02/index.html
2020-02-08 11:02:28 +08:00

150 lines
9.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<head><meta name="generator" content="Hexo 3.9.0">
<!-- Title -->
<meta charset="utf-8">
<meta name="applicable-device" content="pc,mobile">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=3.0, viewport-fit=cover">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="author" content="flypython">
<meta name="designer" content="flypython">
<meta name="keywords" content="飞蟒微课堂Python面试专项课程启动——LeetCode刷题计划,FlyPython - 专业的Python学习社区,flypython, 飞蟒飞蟒PythonPython入门Python自动化Python日报">
<meta property="og:title" content="飞蟒微课堂Python面试专项课程启动——LeetCode刷题计划 | FlyPython - 专业的Python学习社区">
<meta property="og:site_name" content="http://www.flypython.com">
<meta property="og:type" content="article">
<meta property="og:url" content="http://www.flypython.com/article/python-class-02/">
<meta property="og:image" content="http://www.flypython.com/images/class-02.png">
<meta property="og:description" content="飞蟒微课堂Python面试专项课程启动——LeetCode刷题计划--LeetCode刷题计划启动啦">
<meta name="description" content="飞蟒微课堂Python面试专项课程启动——LeetCode刷题计划--LeetCode刷题计划启动啦">
<meta name="rating" content="general">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="robots" content="index, follow">
<link rel="icon" href="/images/favicon.ico">
<title>飞蟒微课堂Python面试专项课程启动——LeetCode刷题计划 | FlyPython - 专业的Python学习社区</title>
<link rel="stylesheet" href="/css/f25.css">
<link rel="stylesheet" href="/css/highlight.css">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-147288599-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-147288599-1');
</script>
</head>
</head>
<body>
<header class="wrapper header-wrapper">
<div class="container header-nav-wrapper">
<div class="logo"><a href="/" title="FlyPython - 专业的Python学习社区"><h1 class="title">FlyPython</h1></a></div>
<nav class="nav-wrapper">
<a href="https://flypython.com/python" title="飞蟒微课堂">飞蟒微课堂</a>
<a href="https://flypython.com/flypython_daily" title="Python日报">Python日报</a>
<a href="https://flypython.com/PyCon/" title="PyCon">PyCon</a>
<a href="https://github.com/flypythoncom" title="Github">Github</a>
<a href="/article/about" title="关于">关于</a>
</nav>
<span class="btn-menu" id="J_header_menu">
<div class="inner">
<span class="line line-01"></span>
<span class="line line-02"></span>
<span class="line line-03"></span>
</div>
</span>
<div class="wrapper mb-nav-wrapper" id="J_header_menu_list">
<nav class="wrapper mb-nav-container">
<a href="https://flypython.com/python" title="飞蟒微课堂">飞蟒微课堂</a>
<a href="https://flypython.com/flypython_daily" title="Python日报">Python日报</a>
<a href="https://flypython.com/PyCon/" title="PyCon">PyCon</a>
<a href="https://github.com/flypythoncom" title="Github">Github</a>
<a href="/article/about" title="关于">关于</a>
</nav>
</div>
</div>
</header>
<section class="body-wrapper">
<section class="wrapper post-banner">
<div class="container post-banner-container">
<h2 class="wrapper title">飞蟒微课堂Python面试专项课程启动——LeetCode刷题计划</h2>
<div class="wrapper tips">
<span>Author</span><span>flypython</span> | <span>Date: </span><span>2020-01-02</span> | <span>Category</span><span><a href="/fly/飞蟒微课堂/" title="飞蟒微课堂">飞蟒微课堂</a><a href="/fly/飞蟒微课堂/LeetCode/" title="LeetCode">LeetCode</a></span>
</div>
</div>
</section>
<section class="wrapper main-wrapper">
<article class="sub-container post-content">
<h2 id="LeetCode刷题计划"><a href="#LeetCode刷题计划" class="headerlink" title="LeetCode刷题计划"></a>LeetCode刷题计划</h2><p>我至今面试过几百人,发现很多候选人基础确实有不少的问题,尤其是转专业的同学。</p>
<p>大多数的公司面试工程师时都会考察这几个方面,</p>
<ul>
<li>数据结构与算法一般为leetcode题目</li>
<li>简历上的项目探讨与深入研究</li>
<li>业务场景设计题</li>
</ul>
<p>按照不同的职位会增加相应的内容。比如算法工程师会问机器学习与深度学习算法如果有paper和比赛也会问一些。但是一般前两轮都是数据结构和算法所以数据结构与算法是敲门砖希望同学们能在这方面多下些功夫。</p>
<p>Python面试专项课程分为两部分一是刷leetcode二是公司面试真题。完整的题解目录请在FlyPython公众号菜单上查看这次主要介绍leetcode面试真题后面会有具体的介绍。</p>
<p>那怎么刷LeetCode呢你可以根据自己的实际情况来决定如果时间充裕可以通过题型来分类每个题型都刷10题左右。如果时间紧张建议刷热门题和公司题库提高命中率。你也可以每周参加leetcode的周赛来维持手感。</p>
<p>真正做到bug free确实很难有的时候刷2-3遍也不行得多做变型题多想多总结不断积累基础就变扎实了。难度以中等为主兼顾hard。</p>
<p>这次的LeetCode刷题计划是以leetcode中文站的精选TOP面试题为基础的题目共145道希望对同学们有帮助。</p>
<ul>
<li>题目链接: <a href="https://leetcode-cn.com/problemset/top/" target="_blank" rel="noopener">https://leetcode-cn.com/problemset/top/</a></li>
<li>题解总目录: <a href="http://flypython.com/leetcode/" target="_blank" rel="noopener">http://flypython.com/leetcode/</a> </li>
<li>leetcode主页: <a href="https://leetcode-cn.com/u/flypython/" target="_blank" rel="noopener">https://leetcode-cn.com/u/flypython/</a></li>
</ul>
<h2 id="附LeetCode练手题"><a href="#附LeetCode练手题" class="headerlink" title="附LeetCode练手题"></a>LeetCode练手题</h2><p>还没有注册LeetCode的同学先去注册一个并完成下面的的练手题。还没有关注FlyPython的同学长按最后的二维码关注我吧。</p>
<h4 id="LCP-1-猜数字"><a href="#LCP-1-猜数字" class="headerlink" title="LCP 1. 猜数字"></a>LCP 1. 猜数字</h4><p>链接:<a href="https://leetcode-cn.com/problems/guess-numbers/" target="_blank" rel="noopener">https://leetcode-cn.com/problems/guess-numbers/</a><br>难度:简单</p>
<h4 id="题目"><a href="#题目" class="headerlink" title="题目"></a>题目</h4><blockquote>
<p>小A 和 小B 在玩猜数字。小B 每次从 1, 2, 3 中随机选择一个小A 每次也从 1, 2, 3 中选择一个猜。他们一共进行三次这个游戏,请返回 小A 猜对了几次?</p>
<p>输入的guess数组为 小A 每次的猜测answer数组为 小B 每次的选择。guess和answer的长度都等于3。</p>
<p>示例 1</p>
<p>输入guess = [1,2,3], answer = [1,2,3]<br>输出3<br>解释小A 每次都猜对了。</p>
<p>示例 2</p>
<p>输入guess = [2,2,3], answer = [3,2,1]<br>输出1<br>解释小A 只猜对了第二次。</p>
<p>限制:</p>
<p>guess的长度 = 3<br>answer的长度 = 3<br>guess的元素取值为 {1, 2, 3} 之一。<br>answer的元素取值为 {1, 2, 3} 之一。</p>
</blockquote>
<h4 id="题解"><a href="#题解" class="headerlink" title="题解"></a>题解</h4><p>leetcode最简单的练手题可以循环比较计数也可以直接三个元素比较。</p>
<h4 id="解法"><a href="#解法" class="headerlink" title="解法"></a>解法</h4><p><img src="https://tva1.sinaimg.cn/large/006tNbRwly1gb1xh2ta3wg313q0hu7s8.gif" alt></p>
<p><img src="https://tva1.sinaimg.cn/large/006tNbRwly1gb937qeljej30p00dwq5g.jpg" alt></p>
</article>
<div class="sub-container gitalk-wrapper" id="gitalk-container"></div>
</section>
<div class="tips-top-wrapper">
<span class="tip-top-container" onclick="scrollToWindowTop()">
<span class="l-bar"></span>
<span class="r-bar"></span>
</span>
</div>
<footer class="wrapper footer-wrapper">
<div class="container"><span class="copyright">&copy; 2020 FlyPython . All Rights Reserved.</span></div>
</footer>
</section>
<script src="/js/f25.js"></script>
</body>
</html>