破解系统设计访谈:Twitter软件工程师的提示

by Zhia Hwa Chong

志华化

破解系统设计访谈:Twitter软件工程师的提示 (Crack the System Design interview: tips from a Twitter software engineer)

I recently wrote about how I landed offers from multiple top-tier tech companies. During my interview preparation process, I read up on a lot of material and prepared a set of notes on how to tackle system design problems. In this article, I’d like to share those tips with you all.

我最近写了关于如何从多家顶级科技公司获得报价的文章 。 在准备面试过程中,我阅读了许多材料,并准备了有关如何解决系统设计问题的一组说明。 在本文中,我想与大家分享这些技巧。

If you’re a fresh graduate with no experience in large-scale distributed systems, or even a seasoned engineer with years of experience under your belt, this article will be useful for you.

如果您是没有大规模分布式系统经验的应届毕业生,或者甚至是具有多年经验的经验丰富的工程师,那么本文对您都是有用的。

Update (3/24/2019): If you’d like to join a group of students to learn more about system design, I’m organizing a small class together! You can go to this link to learn more, or visit my website: zhiachong.com for more info.

更新(3/24/2019) :如果您想加入一组学生以了解有关系统设计的更多信息,我将一起组织一小堂课! 您可以转到此链接以了解更多信息,或访问我的网站zhiachong.com以获取更多信息。

This article is broken down into the following four sections:

本文分为以下四个部分:

  • Ask clarification questions

    提出澄清问题
  • Use your background

    使用你的背景
  • Tackle a problem systematically

    系统地解决问题
  • Keep your own notes

    保留自己的笔记

提出澄清问题 (Ask clarification questions)

A core aim of a systems design interview is to give the candidate an opportunity to demonstrate their knowledge.

系统设计面试的核心目的是使应聘者有机会证明自己的知识。

There are no strictly right or wrong answers. A good system design question usually sounds very ambiguous, and the reason for that is it’s supposed to give you a chance to demonstrate the following:

没有严格正确或错误的答案。 一个好的系统设计问题通常听起来很模棱两可,其原因是应该给您展示以下内容的机会:

  • How you would think about the problem space

    您如何看待问题空间
  • How you think about bottlenecks

    您如何看待瓶颈
  • What you can do to remove these bottlenecks.

    您可以采取哪些措施消除这些瓶颈。

Imagine that you’re being asked to design a black box. How would you tackle the problem? There are no clear directions on what you need to build here, aside from the box being able to hold some items within it.

想象您被要求设计一个黑匣子。 您将如何解决这个问题? 除了可以在其中容纳一些物品的盒子之外,这里没有明确的指示要建造什么。

One of the most useful strategies I personally employ is to ask clarification questions. What are “good” clarification questions, you ask?

我个人采用的最有用的策略之一是提出澄清问题。 您问什么是“好的”澄清问题?

A good clarification question helps you achieve one, or more, of several things:

一个好的澄清问题可以帮助您实现以下一项或多项目标:

  1. Helps you narrow the scope of what you’re supposed to do

    帮助您缩小应该做的事情的范围
  2. Helps clarify what the user expectation of the system is

    帮助阐明用户对系统的期望
  3. Gives you direction about where to proceed

    指导您进行下一步
  4. Informs you of possible bottlenecks/problem areas

    通知您可能的瓶颈/问题区域

In the black box example, you might ask, “well, what does the box hold? How many items does it hold? And who is the intended user?”

在黑匣子示例中,您可能会问:“那么,该箱子能容纳什么? 它容纳多少个物品? 谁是目标用户?”

To that I might say, let’s build a yellow box with a smiley on it that should hold at most 1 tennis ball. This is not an ordinary tennis ball, however. It will be at least 0.5m in radius and weighs about 1kg. It is meant to be hugged, not held, so I don’t want any handle on it.

也许我会说,让我们建立一个黄色的盒子,上面带有一个笑脸,最多可容纳1个网球。 但是,这不是普通的网球。 半径至少为0.5m,重约1kg。 它应该被拥抱,而不是被握住,所以我不需要任何处理。

There you go, this is the box.

您去了,这是盒子。

Always ask clarification questions. You are not being judged on whether or not you asked a specific question during the interview, but you are judged on how you think about the problem space.

总是问澄清问题。 您不会在面试过程中被问到是否问过某个特定问题,而是会根据您对问题空间的看法来判断您。

For example, if I were to ask you to design Twitter right now, how would you do it? Take a few minutes to think about it, and maybe even sketch it out on a piece of paper. Go as deeply and widely as you can, and then come back to this article. Better yet, you can leave your notes in the comments below and we can discuss further.

例如,如果我要您现在设计Twitter,您将如何做? 花几分钟考虑一下,甚至可以在一张纸上画出草图。 尽可能深入和广泛地讨论,然后再回到本文。 更好的是,您可以在下面的评论中留下您的笔记 ,我们可以进行进一步讨论。

If you haven’t realized it yet, the end result of the exercise above would yield significantly different results. For my own specific background, I might delve really deeply into API design and backend infrastructure. I’d probably explore iPhone-specific problems as well, due to my experience. I’ll talk about how the client interacts with the middle-tier endpoints, how logging would work, how I’d design the backend to ensure uptime, and so on.

如果您尚未意识到这一点,那么上面练习的最终结果将产生明显不同的结果。 对于我自己的特定背景,我可能会真正深入地研究API设计和后端基础结构。 根据我的经验,我可能还会探讨特定于iPhone的问题。 我将讨论客户端如何与中间层端点交互,日志将如何工作,如何设计后端以确保正常运行时间,等等。

These are quite interesting discussions that you can have with a colleague, and that is a very strong signal an interviewer is looking for.

您可以与同事进行非常有趣的讨论,这是面试官正在寻找的强烈信号。

利用您的背景优势 (Use your background to your advantage)

Often times I see engineers trying to figure out what the interviewer is trying to ask, and then catering their responses to fit the expectations.

我经常看到工程师试图弄清楚面试官要问的问题,然后根据他们的期望来满足他们的要求。

I actually highly discourage anyone from doing this for several reasons:

实际上,出于以下几个原因,我非常不鼓励任何人这样做:

  1. Everyone has a unique background. In a systems design interview, it’s an opportunity for you to demonstrate what your strengths are. Don’t waste the opporunity trying to figure out what someone else might expect of you.

    每个人都有独特的背景。 在系统设计面试中,这是您展示自己的优势的机会。 不要浪费机会试图弄清楚别人对你的期望。
  2. The interviewer might have been nodding along to your answers, but they might’ve known that you’re just bluffing your way through and not actually thinking about the problem.

    面试官可能一直在回答您的答案,但他们可能已经知道您只是在虚张声势,没有真正考虑问题。

Your experience and background can vary widely from the next candidate. You bring a set of values and expertise to the table that no one else can. That is what makes you valuable and irreplaceable. Regardless of what field you’re in, people care about what you can bring to the table.

您的经验和背景可能与下一个候选人有很大差异。 您将一套价值和专业知识带到了桌上,这是其他人所无法企及的。 那就是让您变得宝贵和不可替代的原因。 无论您处于哪个领域,人们都在乎可以带到餐桌上的东西。

系统地解决问题 (Tackle the problem systematically)

Now, with my expertise in mind, there are several things that I think about when I’m tackling a new system. I highly recommend that you formulate a set of criteria or steps for yourself as well.

现在,考虑到我的专业知识,我在处理新系统时会考虑几件事。 我强烈建议您也为自己制定一套标准或步骤。

Some of the things in my mind when I work on a new system are:

在新系统上工作时,我想到的一些事情是:

  • What is the goal of the system?

    系统的目标是什么?
  • Who are the users of the system?

    谁是系统的用户?
  • What is the scale we’re working with?

    我们正在合作的规模是多少?
  • Is this a new/old system? How do we handle versioning?

    这是新旧系统吗? 我们如何处理版本控制?

Among others…

其中...

See, my set of criteria will be different from a front-end engineer’s set of criteria. I use these criteria to formulate a picture in my head, and these will guide my decision-making process.

瞧,我的标准集将不同于前端工程师的标准集。 我用这些标准在脑海里画一幅画,这些将指导我的决策过程。

Armed with answers to those questions, I can start to tackle the problem at hand and then systematically break it down into individual components.

有了这些问题的答案,我可以开始解决当前的问题,然后系统地将其分解为各个部分。

A good exercise I like to do is how to design a coffee-ordering system. I thought of this while I was sitting at Starbucks one day, and realized that it would be nice if I could order a smoothie on my phone and pick it up at my local Starbucks.

我喜欢做的一个好练习是如何设计咖啡订购系统 。 我有一天坐在星巴克时就想到了这一点,并意识到,如果可以在手机上订购冰沙,然后在当地的星巴克拿起冰沙,那就太好了。

My mind started going in various directions:

我的想法开始朝各个方向发展:

  • What does this coffee-ordering machine do?

    这台咖啡订购机有什么作用?
  • If I build one, can I sell it to Starbucks, or do I white-label it and sell it as a service?

    如果我制造一个,可以将其出售给星巴克,还是将其贴上白标签并作为服务出售?
  • How many users do I need to support if I sell it to Starbucks?

    如果将其出售给星巴克,需要支持多少用户?
  • Alternatively, if I white-label it, can I sell the interface to my coffee-ordering service, and then help the customers build out a backend so that they can store the orders on their local machines?

    或者,如果我将其贴上白标签,我可以将界面出售给我的咖啡订购服务,然后帮助客户构建后端以便他们将订单存储在本地计算机上吗?

Once I get answers to these questions, I can finally form a full picture of what my coffee-ordering service does. Here’s what my version of the coffee-ordering service would look like:

一旦获得这些问题的答案,我就可以完整地了解我的咖啡订购服务的功能。 的咖啡订购服务版本如下所示:

My coffee-ordering service is a software as a service (SAAS). It offers an interface for various partners to plug into.

我的咖啡订购服务是一种软件即服务( SAAS )。 它为各种合作伙伴提供了插入接口。

  • It has an API, called addCoffeeForMerchant, that inserts coffee name, coffee price, and coffee ingredients.

    它具有一个名为addCoffeeForMerchant的API,可插入咖啡名称,咖啡价格和咖啡原料。

  • It has a GET API, called getCoffeesForMerchant, that returns a list of coffees for a given merchant ID.

    它具有一个名为getCoffeesForMerchant的GET API,该API返回给定商家ID的咖啡列表。

  • The merchant ID is a unique identifier (UUID) that is generated using some hashing mechanism, which can be further clarified with the customer.

    商家ID是使用某种哈希机制生成的唯一标识符(UUID),可以与客户进一步阐明。
  • The software is optimized for read-only operations, because most of my customers create their menu once and read it multiple times throughout the day.

    该软件针对只读操作进行了优化,因为我的大多数客户一次创建菜单并全天阅读多次。
  • It has a caching mechanism that uses Least-Recently-Used (LRU) eviction strategy, because if the menu item hasn’t been ordered in a while, my customer doesn’t care if it’s slightly slower in showing up on the menu.

    它具有使用最近最少使用(LRU)驱逐策略的缓存机制,因为如果一段时间未订购菜单项,那么我的客户将不在乎它在菜单上显示的速度是否稍慢。

  • In case one of the data stores self-erupts, my coffee-ordering service will replicate data across different clusters across US west and US east coast because I am targeting the US market only for now.

    万一其中一个数据存储设备自爆,我的咖啡订购服务将跨美国西部和美国东海岸的不同集群复制数据,因为我目前仅针对美国市场。

Alternatively, any other coffee-ordering service that you can think of would be highly probable as well. It’s just a matter of what you’re optimizing for. I think these are very interesting problems, and it’s a great mental exercise to keep your mind engaged.

另外,您可能想到的任何其他咖啡订购服务也很有可能。 这只是您要优化的问题。 我认为这些都是非常有趣的问题,这是使您保持头脑活跃的一项很棒的心理锻炼。

保留自己的笔记 (Keep your own notes)

As a software engineer, it’s a never-ending process of learning. I highly recommend that you use either Evernote or a Moleskin to keep notes. I personally carry a small notebook for quick ideas I need to jot down, and I keep various other things on Evernote whenever I can.

作为软件工程师,这是一个永无止境的学习过程。 我强烈建议您使用Evernote或Moleskin进行笔记。 我个人随身携带一个小笔记本,以记下我需要记下的快速想法,并尽可能地在Evernote上保存其他各种内容。

I have a Notebook named “Programming” in my Evernote. Whenever I run into something new, or something interesting, I jot it down within my notebook for further reference.

我的Evernote中有一个名为“编程”的笔记本。 每当遇到新事物或有趣事物时,我都会将其记在笔记本上以备参考。

I go through and assign labels to these new notes on a monthly or quarterly basis to make sure the notes are organized. For example, I have a “Design” label for anything that has to do with system design. It could be something like a link to a YouTube video that I found interesting, or an interesting argument my coworker put forth that I hadn’t thought about.

我逐月检查并为这些新笔记分配标签,以确保笔记井井有条。 例如,对于与系统设计有关的任何事情,我都有一个“设计”标签。 可能是我发现有趣的YouTube视频链接,或者是我的同事提出的我从未想过的有趣论点。

This is a sample of what one of my notes looks like:

这是我的注释之一的示例:

One of the things I learned recently from a coworker is that NoSQL is great for prototyping, because there’s no need to undergo schema discussions with other teams. If I wanted to change the schema, I can do that really quickly with a NoSQL database. That was a key learning from work that I inserted into my “Programming” notebook.

我最近从一位同事那里了解到的一件事是NoSQL非常适合进行原型设计,因为无需与其他团队进行架构讨论。 如果要更改架构,则可以使用NoSQL数据库快速完成。 这是我从“编程”笔记本中插入的工作中的关键经验。

I break down my notes into:

我将笔记分解为:

  1. Systems designs

    系统设计
  2. Interviewing (experience + review of different interviews I’ve had in the past, grouped by company name)

    面试(经验+对我过去进行过的不同面试的审查,按公司名称分组)
  3. Random tid-bits, CS good-to-know, like useful bash scripts or command-line tricks

    随机的tid位,CS众所周知,例如有用的bash脚本或命令行技巧
  4. Readings / YouTube videos

    阅读资料/ YouTube视频

All of the notes above go under “Programming”. Over time, I find that I have a pseudo-organized collection of things I’ve either read or explored in the past.

以上所有注释都在“编程”下。 随着时间的流逝,我发现我拥有过去已经阅读或探索过的伪组织的东西。

As anyone who knows me on a personal level, I’m not a very organized person. Thus, I’ve only collected maybe 10 - 15% of things, so there’s much more left to do there.

就个人而言,认识我的人不是一个有条理的人。 因此,我只收集了大约10%到15%的东西,因此还有更多要做的事情。

Knowledge and practice go hand-in-hand in getting better at systems designs. If you feel that your current work doesn’t afford you the opportunity to do systems designs, then you should either find one that does, or try to design one small part of an existing architecture such that it’s either faster, cheaper, more robust, or easier to modify in the future.

知识和实践是携手并进的,以便更好地进行系统设计。 如果您认为当前的工作没有给您提供进行系统设计的机会,那么您应该找到一个可以做的设计,或者尝试设计现有体系结构的一小部分,以使其更快,更便宜,更可靠,或者将来更容易修改。

我推荐的资源 (Resources I recommend)

Intro to: Architecture and Systems Designs - Great Youtube tutorial from an ex-Facebook-engineer about how to approach systems design problems.

简介:体系结构和系统设计 -前Facebook工程师提供的有关如何解决系统设计问题的Great Youtube教程。

Designing data-intensive applications - Another good resource for learning how to design for scale. It talks about various things a typical software engineer takes for granted — how databases (mySQL and noSQL) work, when to use each, pros and cons of various techniques for handling scale etc. I highly recommend it ?

设计数据密集型应用程序 -学习如何按比例设计的另一个很好的资源。 它讨论了典型软件工程师理所当然的各种事情-数据库(mySQL和noSQL)如何工作,何时使用每种数据库以及处理规模等各种技术的利弊。我强烈推荐它吗?

Mock Interviews - A simulated environment that mimics the actual interview is extremely helpful in preparing for interviews. If you can find a friend to do it for you, then I highly recommend it. I also run mock interviews, so if you’re interested, feel free to reach me at zhiachong.com!

模拟面试-模拟实际面试的模拟环境对于准备面试非常有帮助。 如果您可以找到一个朋友帮您做,那么我强烈推荐。 我还会进行模拟面试,因此,如果您有兴趣,请随时访问zhiachong.com与我联系 !

What every software engineer should know about real-time data’s unifying abstraction - A very lengthy and technical discussion about logs, trade-offs. I haven’t finished it yet, but it comes highly recommended from a coworker.

每个软件工程师应该了解的有关实时数据统一抽象的知识 -有关日志,权衡取舍的冗长而技术性的讨论。 我还没有完成,但是强烈推荐给同事。

Evernote - The best ? note-keeping app I’ve used. There are many tutorials on how to best utilize Evernote. I haven’t gone through them yet, simply because I use it as just a notebook. I log everything I learn on there, and then occasionally go through and reorganize them.

印象笔记 -最好的? 我使用过的记事应用程序。 有很多关于如何最好地利用Evernote的教程。 我还没有经历过这些,仅仅是因为我只是将其用作笔记本。 我将在此学习的所有内容记录下来,然后偶尔进行整理和整理。

Moleskin notebook - I really enjoy this one. The quality of it is extremely high. The price is slightly higher, but since I use it on a daily basis, I consider it a good investment. Holding a beautiful notebook in my hands everyday makes me more excited to write more notes.

Moleskin笔记本 -我真的很喜欢这一本。 它的质量非常高。 价格略高,但是由于我每天使用它,因此我认为这是一笔不错的投资。 每天我手里拿着一个漂亮的笔记本使我更加兴奋地写下更多笔记。

Pilot G2 (Black) - Easily the best pens I’ve ever used, and the only pens I’ll use. I buy them in bulk from Amazon and keep them around everywhere I go. I have one in my backpack, one in the office, and one in my home office so that I always have a pen around. It writes great, the ink flows smoothly, and I just love the feel of writing with it. Coupled with the Moleskin, sometimes I just want to pick up the G2 to jot random things on there because these two are so perfect together.

G2飞行员(黑色) -轻松获得我曾经使用过的最好的笔,并且是我唯一会使用的笔。 我从亚马逊大量购买它们,并随处携带。 我的背包里有一个,办公室里有一个,家庭办公室里有一个,所以我周围总是有一支笔。 它书写出色,墨水顺畅流动,我只是喜欢用它书写。 加上Moleskin,有时候我只想拿起G2在那儿随意玩,因为这两者非常完美。

Grokking the System Design Interview — This one comes as a recommendation from friends. It’s an online course that teaches how to design distributed system in detail. It’s a $79 course, however. There’s a team-pricing. If there’s any interest, I’ll check with them to see if it’s possible to form a group for group-discount.

探索系统设计面试 -这是朋友的推荐。 这是一门在线课程,教您如何详细设计分布式系统。 然而,这是一门79美元的课程。 有团队定价。 如果有兴趣,我会与他们核对,看看是否有可能组建团体折扣团体。

Follow me on Twitter, Facebook, and LinkedIn. Sign up for my mailing list where I regularly send tips, tricks and industry learnings.

在Twitter , Facebook和LinkedIn上关注我。 注册我的邮件列表 ,我在那里定期发送提示,技巧和行业知识。

If you enjoyed this article, comment below: what is your tip for building a scalable, reliable system?

如果您喜欢本文,请在下面评论: 构建可扩展,可靠系统的提示是什么?

翻译自: https://www.freecodecamp.org/news/how-to-system-design-dda63ed27e26/

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/394363.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

leetcode474. 一和零(动态规划)

在计算机界中,我们总是追求用有限的资源获取最大的收益。 现在,假设你分别支配着 m 个 0 和 n 个 1。另外,还有一个仅包含 0 和 1 字符串的数组。 你的任务是使用给定的 m 个 0 和 n 个 1 ,找到能拼出存在于数组中的字符串的最大…

jQuery对象与DOM对象的相互转换

一、检测方式上的区别 检测DOM对象: if (Object.nodeType) 检测jQery对象: if (Object.jquery) 二、转换方式 jQuery对象转DOM对象: var DOMObject jQueryObject.get([index]); // 或者 var DOMObject jQueryObject[index]; DOM对象转jQuer…

ProcessExplore 最新版

http://files.cnblogs.com/files/zhangdongsheng/ProcessExplorer.zip转载于:https://www.cnblogs.com/zhangdongsheng/p/6195743.html

javascript对象包含哪些要素_让人迷糊的JavaScript对象(Object一)

对于很多初学的小伙伴听到JavaScript内置对象、BOM、DOM、WEB API等关键词基本上都是迷糊,不是很明白他们之间的关系,以及他们是如果建立联系的。虽然我们现在小伙伴在学VUE,React等框架能简化我们的操作,但是遇到一些基础的问题还…

被吐嘈的NodeJS的异常处理

被吐嘈的NodeJS的异常处理 许多人都有这样一种映像,NodeJS比较快; 但是因为其是单线程,所以它不稳定,有点不安全,不适合处理复杂业务; 它比较适合对并发要求比较高,而且简单的业务场景。 在Expr…

javascript关键字_让我们揭开JavaScript的“ new”关键字的神秘面纱

javascript关键字by Cynthia Lee辛西娅李(Cynthia Lee) 让我们揭开JavaScript的“ new”关键字的神秘面纱 (Let’s demystify JavaScript’s ‘new’ keyword) Over the weekend, I completed Will Sentance’s JavaScript: The Hard Parts. It might not sound like the most…

查看 rabbitmq 启动websocket 提示404_RabbitMQ在windows下安装(笔记)

先保证Java开发环境一切正常,【jdk,maven】,然后下载两个文件,1,下载OTPhttps://www.rabbitmq.com/download.html 下载地址下载RabbitMQ Downloading and Installing RabbitMQ:地址安装没有别的操作,一直下一步就好;2&…

[Leetcode] Longest Valid Parentheses

找出字串裡最長的合法括號組 簡單說&#xff0c;一樣stack搜尋合法parenth&#xff0c;把不合法的 ( & ) index 紀錄下來&#xff0c;最後算index間的差值取最大就是最長的 public class Solution{/// <summary>/// 把不合法的( )的index記下來&#xff0c;取最長的差…

leetcode35. 搜索插入位置(二分搜索)

给定一个排序数组和一个目标值&#xff0c;在数组中找到目标值&#xff0c;并返回其索引。如果目标值不存在于数组中&#xff0c;返回它将会被按顺序插入的位置。 你可以假设数组中无重复元素。 示例 1: 输入: [1,3,5,6], 5 输出: 2 代码 class Solution {public int sear…

[deviceone开发]-do_Album的简单示例

一、简介do_Album用来打开手机系统提供的相册&#xff0c;能选择一张或多张图片返回给开发者&#xff0c;通常相册的图片比较大&#xff0c;要经过缩放。有的时候用户也需要把别的地方获取到到图片收藏到系统相册。这个示例简单展示这个组件的2个基本功能。二、效果图三、相关下…

公办低分二本_这六所公办二本高校的计算机类相关专业值得低分段考生选择

邯郸学院——计算机科学与技术近年来&#xff0c;邯郸学院着力强化“以本为本”理念,坚持“学生中心”“产出导向”原则&#xff0c;加强学科专业建设&#xff0c;获批国家级特色专业1个&#xff0c;省级重点发展学科3个&#xff0c;省级一流专业7个&#xff0c;英语等3个专业入…

用户体验改善案例_用户体验案例研究:建立更好的体验(重新设计“和平航空”网站)...

用户体验改善案例by Peace Ojemeh (Perrie)由Peace Ojemeh(Perrie) 用户体验案例研究&#xff1a;建立更好的体验(重新设计“和平航空”网站) (A UX case study: Building a better experience (Re-designing the Air Peace Airline website)) Traveling by air is always an …

[转]FFMPEG调节音频的音量大小,混音

链接&#xff1a;https://blog.csdn.net/nil_lu/article/details/52078488 转载于:https://www.cnblogs.com/zifeiy/p/10675734.html

局域网即时通讯软件_无线局域网中,安卓手机和电脑的资源如何实现互传互访?...

安卓手机和电脑之间的资源共享&#xff0c;可实现的方案有很多&#xff0c;例如&#xff1a;方案一是各种官方或第三方出品的“XX手机助手”软件。优点是直连的传输速率最高&#xff1b;缺点一是手机和电脑必须连在一起&#xff0c;相当不方便&#xff0c;缺点二是万一中途发生…

leetcode516. 最长回文子序列(动态规划)

***给定一个字符串 s &#xff0c;找到其中最长的回文子序列&#xff0c;并返回该序列的长度。***可以假设 s 的最大长度为 1000 。 示例 1: 输入: “bbbab” 输出: 4 一个可能的最长回文子序列为 “bbbb”。 解题思路 数组含义&#xff1a;dp[i][j]子串&#xff08;i&#…

Ubuntu 14.04 FTP服务器--vsftpd的安装和配置

更新源列表 打开"终端窗口"&#xff0c;输入"sudo apt-get update"-->回车-->"输入当前登录用户的管理员密码"-->回车,就可以了。如果不运行该命令&#xff0c;直接安装vsftpd,会出现"有 几个软件包无法下载&#xff0c;您可以运…

校验电话号码 手机号码正则表达式

2019独角兽企业重金招聘Python工程师标准>>> 电话号码 手机号码 等准确详细 正则表达式电话号码正则表达式 &#xff08;支持手机号码&#xff0c;3-4位区号&#xff0c;7-8位直播号码&#xff0c;1&#xff0d;4位分机号&#xff09; ((\d{11})|^((\d{7,8})|(\d{4}…

期刊投稿状态_SCI投稿全过程解析及拒稿后处理对策

之前给大家介绍了如果使用人工智能来提高SCI写作效率的神器&#xff0c;相信大家对SCI写作已经很有信心了。但有些小伙伴后台说对投稿过程很没有概念&#xff0c;不同期刊不同状态。那么今天我们就对SCI投稿过程、投稿状态做一个总结和解析以及拒稿后处理对策及接受后期相关问答…

cake php_如何(以及为什么)在Swinject中使用Cake Pattern

cake phpby Peter-John Welcome由Peter-John Welcome 如何(以及为什么)在Swinject中使用Cake Pattern (How (and why) to use the Cake Pattern with Swinject) In my previous article, I showed how we can use the Cake Pattern to do dependency injection without any li…

运用Appium 实现添加微信好友自动化

本文为原创文章&#xff0c;如需转载请注明出处. 任务&#xff1a;实现批量添加微信好友自动化。 任务分析&#xff1a;1.首先要实现添加单个好友步骤自动化。 2.实现脚本读取Excel里的值。 3.参数化好友电话号码或者昵称。 PS:代码采用POM(Page Object Model)便于后续维护 数…