<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Career on Nansen Li's Blog
李楠森的博客</title><link>https://nansenli.com/categories/career/</link><description>Recent content in Career on Nansen Li's Blog
李楠森的博客</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>Nansen Li 🌈 （李楠森）</copyright><lastBuildDate>Tue, 29 Jul 2025 23:52:58 +0100</lastBuildDate><atom:link href="https://nansenli.com/categories/career/index.xml" rel="self" type="application/rss+xml"/><item><title>Interview Experience Summary</title><link>https://nansenli.com/post/2025/07/interview2025/</link><pubDate>Tue, 29 Jul 2025 23:52:58 +0100</pubDate><guid>https://nansenli.com/post/2025/07/interview2025/</guid><description>&lt;p>Here&amp;rsquo;s a summary of all my interview experiences over the past year.&lt;/p>
&lt;p>Overall, the results were quite satisfactory. I continuously applied for positions ranging from New Graduate (NG) to experienced roles, and ultimately received a satisfactory offer, successfully landing a job. I hope this experience will be helpful for future students coming to Ireland to study and find work.&lt;/p>
&lt;p>Before diving into the specific details, let me introduce my background: I previously worked for several years at a major tech company in China, then came to DCU for my master&amp;rsquo;s degree, and was looking for Software Engineer related positions in Ireland.&lt;/p>
&lt;p>Starting from October last year (shortly after enrollment), I began submitting resumes, mainly for NG positions and internship roles. I continued applying until February of the following year, during which time I only received one interview invitation from Google for an internship. Later, because the internship was quite busy, I paused my applications. After the exams ended (May), I concentrated on applying for a batch of positions and gradually received multiple interview opportunities. After going through the interview process, I finally received a formal offer. From this concentrated application period to receiving the offer, it took about one and a half months.&lt;/p>
&lt;p>I kept records of every resume submission, with a total of at least 81 positions applied to.&lt;/p>
&lt;p>Below are records of some positions where I received interview invitations:&lt;/p>
&lt;hr>
&lt;h3 id="google-internship-position">&lt;strong>Google Internship Position&lt;/strong>
&lt;/h3>&lt;p>Two rounds of video interviews:&lt;/p>
&lt;ul>
&lt;li>First round: One LeetCode medium-difficulty algorithm problem;&lt;/li>
&lt;li>Second round: One simple problem, but performed poorly, guessing that&amp;rsquo;s why I didn&amp;rsquo;t pass.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="apple-testing-position">&lt;strong>Apple Testing Position&lt;/strong>
&lt;/h3>&lt;ul>
&lt;li>
&lt;p>First round video interview: Testing SQL and some basic algorithms;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Second round covered various topics, from resume discussion to testing theory, to Python&amp;rsquo;s requests package;&lt;/p>
&lt;p>Overall felt my performance was average, guessing the reason for not passing might be slight inadequacy, as well as the position not matching well with my development background.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="apple-full-stack-position">&lt;strong>Apple Full Stack Position&lt;/strong>
&lt;/h3>&lt;p>Although I received an interview invitation, because the position was in Cork and I had already decided to develop in Dublin and rented a house, I directly declined this opportunity, feeling slightly regretful.&lt;/p>
&lt;hr>
&lt;h3 id="meta-sse-position">&lt;strong>Meta SSE Position&lt;/strong>
&lt;/h3>&lt;p>It was during exam week, so I negotiated with the Recruiter to postpone for a month, but after that, they never contacted me again, which should be considered being ghosted. However, I don&amp;rsquo;t think it was my own issue, as I have friends who performed very well in interviews but still didn&amp;rsquo;t pass, possibly related to Meta&amp;rsquo;s HC (headcount) reduction this year.&lt;/p>
&lt;hr>
&lt;h3 id="amazon-swe-position">&lt;strong>Amazon SWE Position&lt;/strong>
&lt;/h3>&lt;p>First round interview content included:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>BQ (Behavioral Questions) section: Answers were acceptable;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Technical section asked about OOP design rather than algorithm problems, but I was inadequately prepared and not familiar with OOP;&lt;/p>
&lt;p>Additionally, Amazon mostly has Java positions, and I have limited interest in Java, so not passing was somewhat natural.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="ptc-swe-position">&lt;strong>PTC SWE Position&lt;/strong>
&lt;/h3>&lt;p>At the beginning of the phone call, they clearly stated they don&amp;rsquo;t provide work visas. I mentioned I could start with a 1G status, making the situation slightly awkward. Although we still went through the process, it ultimately didn&amp;rsquo;t progress.&lt;/p>
&lt;hr>
&lt;h3 id="ebay-swe">&lt;strong>eBay SWE&lt;/strong>
&lt;/h3>&lt;p>The Recruiter had preliminary communication, asked some basic questions, but didn&amp;rsquo;t proceed to the next round. Presumably, they already had more suitable candidates.&lt;/p>
&lt;hr>
&lt;h3 id="workday">&lt;strong>Workday&lt;/strong>
&lt;/h3>&lt;p>Preliminary communication with the Recruiter went smoothly, entered the waiting process stage. The originally scheduled interview time was temporarily cancelled, then rescheduled. Because I was already waiting for Arista&amp;rsquo;s formal offer at that time, I actively stopped the process.&lt;/p>
&lt;hr>
&lt;h3 id="arista">&lt;strong>Arista&lt;/strong>
&lt;/h3>&lt;p>The Recruiter first contacted me when I was at the gym, the sound was too noisy, so we agreed to contact later. Afterwards, HR sent the time for the first interview.&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>First interview&lt;/strong>: Due to technical issues, it couldn&amp;rsquo;t start smoothly, after rescheduling, completed two algorithm problems, passed;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Second round&lt;/strong>: On-site interview, continued with two algorithm problems, the second problem was quite difficult, took an hour to complete, passed;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Third round&lt;/strong>: Also an on-site interview, with more in-depth questions;&lt;/p>
&lt;p>After passing the interviews, waited for headquarters approval for the formal offer, the entire process took about a month.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="experience-summary">&lt;strong>Experience Summary&lt;/strong>
&lt;/h2>&lt;ul>
&lt;li>&lt;strong>Both NG and experienced positions can be applied for&lt;/strong>, don&amp;rsquo;t self-limit because of being &amp;ldquo;overqualified&amp;rdquo;, it doesn&amp;rsquo;t actually have that much impact;&lt;/li>
&lt;li>&lt;strong>Video interview pressure is greater than expected&lt;/strong>: Problems you can usually solve, you might not even perform well on simple problems during interviews;&lt;/li>
&lt;li>&lt;strong>Systematic problem-solving practice&lt;/strong>: Recommend solving at least 100 LeetCode problems, 200 is a relatively safe level, beyond that depends on time and energy, pursuing cost-effectiveness;&lt;/li>
&lt;li>&lt;strong>Don&amp;rsquo;t be afraid of rejection&lt;/strong>: Each rejection is a screening process, helping you find positions more suitable for yourself; summarize experiences in time and continue with the next company;&lt;/li>
&lt;li>&lt;strong>Maintain stable mindset&lt;/strong>: Submitting resumes is essentially a probability problem, the key is continuous output + good accumulation.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;p>Wishing everyone success in landing their desired positions!&lt;/p></description></item><item><title>2018-09-15 NetEase Interactive Entertainment Interview</title><link>https://nansenli.com/post/jianshu/%E9%9A%8F%E7%AC%94/2018-09-15-%E7%BD%91%E6%98%93%E4%BA%92%E5%A8%B1%E9%9D%A2%E8%AF%95/</link><pubDate>Sat, 15 Sep 2018 15:59:00 +0000</pubDate><guid>https://nansenli.com/post/jianshu/%E9%9A%8F%E7%AC%94/2018-09-15-%E7%BD%91%E6%98%93%E4%BA%92%E5%A8%B1%E9%9D%A2%E8%AF%95/</guid><description>&lt;p>Interviewed at a hotel in Chengdu
Will update if I remember more&lt;/p>
&lt;h2 id="written-test">Written Test
&lt;/h2>&lt;p>Implement a hashmap using open addressing, with int as key and string as value, time limit 30 minutes&lt;/p>
&lt;h2 id="first-interview">First Interview
&lt;/h2>&lt;ul>
&lt;li>Purpose and principles of volatile&lt;/li>
&lt;li>Differences between dynamic_cast and static_cast&lt;/li>
&lt;li>Issues with legal conversions between parent and child classes using dynamic_cast&lt;/li>
&lt;li>Virtual destructors and vtables&lt;/li>
&lt;li>RTTI (Run-Time Type Information) and type_info&lt;/li>
&lt;li>Sizeof for structures&lt;/li>
&lt;li>Characteristics of red-black trees; given approximately 12 numbers, provide a possible red-black tree result and draw it&lt;/li>
&lt;li>API call process for establishing a server listen, how to implement non-blocking epoll&lt;/li>
&lt;li>Principles of epoll, differences in business code logic between edge-triggered and level-triggered&lt;/li>
&lt;li>TCP packet sticking (concatenation)&lt;/li>
&lt;li>Throwing two eggs from a 100-story building to determine the egg&amp;rsquo;s hardness, dynamic programming solution method&lt;/li>
&lt;li>1 billion players, each with a score ranging from 0 to 100,000, how to determine a player&amp;rsquo;s ranking&lt;/li>
&lt;li>Redis skip list&lt;/li>
&lt;li>How memory barriers are implemented in assembly&lt;/li>
&lt;li>Two things that every void func() assembly program needs to do at the beginning&lt;/li>
&lt;li>How to determine the cause of a memory leak&lt;/li>
&lt;li>How to print something before the main function. What other programs execute before the main function.&lt;/li>
&lt;/ul>
&lt;h2 id="second-interview">Second Interview
&lt;/h2>&lt;ul>
&lt;li>Differences between Python&amp;rsquo;s is and == operators, the id function&lt;/li>
&lt;li>Differences between Python&amp;rsquo;s xrange and range&lt;/li>
&lt;li>Python iterators&lt;/li>
&lt;li>Redis ziplist&lt;/li>
&lt;li>Redis TTL expiration implementation&lt;/li>
&lt;li>STL deque implementation (I answered list, which was incorrect. Then asked how I would implement a deque)&lt;/li>
&lt;li>What happens between running a program in shell and the program outputting &amp;ldquo;hello world&amp;rdquo;, in detail&lt;/li>
&lt;li>Draw a typical memory layout for a Linux program&lt;/li>
&lt;li>Can different threads access each other&amp;rsquo;s stack space?&lt;/li>
&lt;li>A matrix of length x and width y, with holes at the four corners. A ball starts from a certain point and moves indefinitely without friction. Which hole will it enter?&lt;/li>
&lt;li>What can be put inside the [] of a lambda expression, how do you think the compiler implements lambda expressions&lt;/li>
&lt;li>What is an rvalue (I confused rvalue with rvalue reference here)&lt;/li>
&lt;li>The implementation process of malloc, does malloc always call brk to adjust the heap boundary? Introduction to the buddy system&lt;/li>
&lt;li>How do HTTPS clients and servers implement protocol selection, what are the commonly used protocols now&lt;/li>
&lt;li>The process of client verification of the server in HTTPS&lt;/li>
&lt;/ul></description></item><item><title>2018-08-29 Tencent Timi Phone Interview</title><link>https://nansenli.com/post/jianshu/%E9%9A%8F%E7%AC%94/2018-08-29-%E8%85%BE%E8%AE%AF%E5%A4%A9%E7%BE%8E%E7%94%B5%E8%AF%9D%E9%9D%A2%E8%AF%95/</link><pubDate>Wed, 29 Aug 2018 04:32:00 +0000</pubDate><guid>https://nansenli.com/post/jianshu/%E9%9A%8F%E7%AC%94/2018-08-29-%E8%85%BE%E8%AE%AF%E5%A4%A9%E7%BE%8E%E7%94%B5%E8%AF%9D%E9%9D%A2%E8%AF%95/</guid><description>&lt;ul>
&lt;li>Three-way handshake and four-way termination&lt;/li>
&lt;li>Nagle algorithm&lt;/li>
&lt;li>What states does a TCP connection go through when disconnecting&lt;/li>
&lt;li>How to choose between multiple processes and multiple threads, considering business needs&lt;/li>
&lt;li>How much knowledge of MySQL master-slave clusters&lt;/li>
&lt;li>GDB debugging process in a multi-process environment&lt;/li>
&lt;li>Introduction to network frameworks like libevent&lt;/li>
&lt;li>Differences between select and epoll. Why Java uses select for connection instead of epoll&lt;/li>
&lt;li>Inter-process communication methods&lt;/li>
&lt;li>Understanding of locks. Implementation of lock-free data structures&lt;/li>
&lt;li>How to design shared memory mutex&lt;/li>
&lt;/ul></description></item><item><title>Tencent Campus Recruitment Essay</title><link>https://nansenli.com/post/jianshu/%E9%9A%8F%E7%AC%94/%E8%85%BE%E8%AE%AF%E6%A0%A1%E6%8B%9B%E9%9A%8F%E7%AC%94/</link><pubDate>Wed, 11 Apr 2018 08:39:00 +0000</pubDate><guid>https://nansenli.com/post/jianshu/%E9%9A%8F%E7%AC%94/%E8%85%BE%E8%AE%AF%E6%A0%A1%E6%8B%9B%E9%9A%8F%E7%AC%94/</guid><description>&lt;h2 id="introduction">Introduction
&lt;/h2>&lt;p>There were two phone interviews in the early selection phase, which I&amp;rsquo;ll skip here.
First published at: &lt;a class="link" href="https://www.jianshu.com/p/d5aa63a27172" target="_blank" rel="noopener"
>https://www.jianshu.com/p/d5aa63a27172&lt;/a>&lt;/p>
&lt;h2 id="first-interview">First Interview
&lt;/h2>&lt;p>Chengdu, April 11&lt;/p>
&lt;ul>
&lt;li>Introduce your projects, what were the difficulties, and how did you solve them&lt;/li>
&lt;li>Introduce C++11 features&lt;/li>
&lt;li>Explain the fork function&lt;/li>
&lt;li>Explain the TIME_WAIT state&lt;/li>
&lt;li>Why does a TCP connection handshake require three steps&lt;/li>
&lt;li>Explain iterator invalidation. Does push_back cause iterator invalidation?&lt;/li>
&lt;li>Characteristics of red-black trees, explain&lt;/li>
&lt;li>Methods to resolve hash collisions&lt;/li>
&lt;li>Differences between processes and threads&lt;/li>
&lt;li>What thread models do you use&lt;/li>
&lt;li>Explain coroutines&lt;/li>
&lt;li>Explain the quicksort algorithm&lt;/li>
&lt;li>What is a stable sort, is quicksort stable, and why&lt;/li>
&lt;li>Derive the formula for the worst-case scenario of quicksort&lt;/li>
&lt;li>Why should a destructor be virtual&lt;/li>
&lt;li>Why can&amp;rsquo;t a constructor be a virtual function&lt;/li>
&lt;li>Questions printed on paper, testing: new[] objects, static members, what exactly a subclass constructor calls, differences between copy constructors and assignment operators, when the equals sign appears in a copy constructor, when an assignment operator is needed, deep copy vs. shallow copy, when virtual functions are called.&lt;/li>
&lt;/ul>
&lt;p>Below is one of the questions, please write the output:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;span class="lnt">18
&lt;/span>&lt;span class="lnt">19
&lt;/span>&lt;span class="lnt">20
&lt;/span>&lt;span class="lnt">21
&lt;/span>&lt;span class="lnt">22
&lt;/span>&lt;span class="lnt">23
&lt;/span>&lt;span class="lnt">24
&lt;/span>&lt;span class="lnt">25
&lt;/span>&lt;span class="lnt">26
&lt;/span>&lt;span class="lnt">27
&lt;/span>&lt;span class="lnt">28
&lt;/span>&lt;span class="lnt">29
&lt;/span>&lt;span class="lnt">30
&lt;/span>&lt;span class="lnt">31
&lt;/span>&lt;span class="lnt">32
&lt;/span>&lt;span class="lnt">33
&lt;/span>&lt;span class="lnt">34
&lt;/span>&lt;span class="lnt">35
&lt;/span>&lt;span class="lnt">36
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-c++" data-lang="c++">&lt;span class="line">&lt;span class="cl">&lt;span class="cp">#include&lt;/span> &lt;span class="cpf">&amp;lt;iostream&amp;gt;&lt;/span>&lt;span class="cp">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="cp">&lt;/span>&lt;span class="k">using&lt;/span> &lt;span class="k">namespace&lt;/span> &lt;span class="n">std&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">struct&lt;/span> &lt;span class="nc">A&lt;/span>&lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">A&lt;/span>&lt;span class="p">(){&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">local_var&lt;/span>&lt;span class="o">++&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">virtual&lt;/span> &lt;span class="kt">void&lt;/span> &lt;span class="nf">func&lt;/span>&lt;span class="p">(){&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">cout&lt;/span> &lt;span class="o">&amp;lt;&amp;lt;&lt;/span> &lt;span class="s">&amp;#34;A&amp;#34;&lt;/span> &lt;span class="o">&amp;lt;&amp;lt;&lt;/span> &lt;span class="n">endl&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">static&lt;/span> &lt;span class="kt">int&lt;/span> &lt;span class="n">local_var&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">};&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kt">int&lt;/span> &lt;span class="n">A&lt;/span>&lt;span class="o">::&lt;/span>&lt;span class="n">local_var&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="mi">0&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">struct&lt;/span> &lt;span class="nc">B&lt;/span> &lt;span class="o">:&lt;/span> &lt;span class="n">A&lt;/span>&lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">B&lt;/span>&lt;span class="p">(){&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">local_var&lt;/span>&lt;span class="o">+=&lt;/span>&lt;span class="mi">2&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">virtual&lt;/span> &lt;span class="kt">void&lt;/span> &lt;span class="nf">func&lt;/span>&lt;span class="p">(){&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">cout&lt;/span> &lt;span class="o">&amp;lt;&amp;lt;&lt;/span> &lt;span class="s">&amp;#34;B&amp;#34;&lt;/span> &lt;span class="o">&amp;lt;&amp;lt;&lt;/span> &lt;span class="n">endl&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">};&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kt">int&lt;/span> &lt;span class="nf">main&lt;/span>&lt;span class="p">(){&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">A&lt;/span>&lt;span class="o">*&lt;/span> &lt;span class="n">a1&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="k">new&lt;/span> &lt;span class="n">B&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="mi">3&lt;/span>&lt;span class="p">];&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">cout&lt;/span> &lt;span class="o">&amp;lt;&amp;lt;&lt;/span> &lt;span class="n">a1&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="mi">0&lt;/span>&lt;span class="p">].&lt;/span>&lt;span class="n">local_var&lt;/span> &lt;span class="o">&amp;lt;&amp;lt;&lt;/span> &lt;span class="n">endl&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">a1&lt;/span>&lt;span class="o">-&amp;gt;&lt;/span>&lt;span class="n">func&lt;/span>&lt;span class="p">();&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">A&lt;/span> &lt;span class="n">a2&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">a1&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="mi">0&lt;/span>&lt;span class="p">];&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">cout&lt;/span> &lt;span class="o">&amp;lt;&amp;lt;&lt;/span> &lt;span class="n">a2&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">local_var&lt;/span> &lt;span class="o">&amp;lt;&amp;lt;&lt;/span> &lt;span class="n">endl&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">a2&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">func&lt;/span>&lt;span class="p">();&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">A&lt;/span> &lt;span class="n">a3&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">a3&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">a1&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="mi">0&lt;/span>&lt;span class="p">];&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">cout&lt;/span> &lt;span class="o">&amp;lt;&amp;lt;&lt;/span> &lt;span class="n">a3&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">local_var&lt;/span> &lt;span class="o">&amp;lt;&amp;lt;&lt;/span> &lt;span class="n">endl&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">a3&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">func&lt;/span>&lt;span class="p">();&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>What problem will occur in the following code?&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;span class="lnt">18
&lt;/span>&lt;span class="lnt">19
&lt;/span>&lt;span class="lnt">20
&lt;/span>&lt;span class="lnt">21
&lt;/span>&lt;span class="lnt">22
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-c++" data-lang="c++">&lt;span class="line">&lt;span class="cl">&lt;span class="cp">#include&lt;/span> &lt;span class="cpf">&amp;lt;iostream&amp;gt;&lt;/span>&lt;span class="cp">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="cp">&lt;/span>&lt;span class="k">using&lt;/span> &lt;span class="k">namespace&lt;/span> &lt;span class="n">std&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">struct&lt;/span> &lt;span class="nc">A&lt;/span>&lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">virtual&lt;/span> &lt;span class="kt">void&lt;/span> &lt;span class="nf">func1&lt;/span>&lt;span class="p">(){&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">cout&lt;/span> &lt;span class="o">&amp;lt;&amp;lt;&lt;/span> &lt;span class="n">a&lt;/span> &lt;span class="o">&amp;lt;&amp;lt;&lt;/span> &lt;span class="n">endl&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kt">void&lt;/span> &lt;span class="nf">func2&lt;/span>&lt;span class="p">(){&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">cout&lt;/span> &lt;span class="o">&amp;lt;&amp;lt;&lt;/span> &lt;span class="n">a&lt;/span> &lt;span class="o">&amp;lt;&amp;lt;&lt;/span> &lt;span class="n">endl&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kt">void&lt;/span> &lt;span class="nf">func3&lt;/span>&lt;span class="p">(){&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">cout&lt;/span> &lt;span class="o">&amp;lt;&amp;lt;&lt;/span> &lt;span class="s">&amp;#34;a&amp;#34;&lt;/span> &lt;span class="o">&amp;lt;&amp;lt;&lt;/span> &lt;span class="n">endl&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kt">int&lt;/span> &lt;span class="n">a&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">};&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kt">int&lt;/span> &lt;span class="nf">main&lt;/span>&lt;span class="p">(){&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">A&lt;/span> &lt;span class="o">*&lt;/span> &lt;span class="n">a&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">A&lt;/span>&lt;span class="o">*&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="n">malloc&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="k">sizeof&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">A&lt;/span>&lt;span class="p">));&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">a&lt;/span>&lt;span class="o">-&amp;gt;&lt;/span>&lt;span class="n">func1&lt;/span>&lt;span class="p">();&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">a&lt;/span>&lt;span class="o">-&amp;gt;&lt;/span>&lt;span class="n">func2&lt;/span>&lt;span class="p">();&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">a&lt;/span>&lt;span class="o">-&amp;gt;&lt;/span>&lt;span class="n">func3&lt;/span>&lt;span class="p">();&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;ul>
&lt;li>The approach to a problem during the written test (previous Nowcoder test. The interviewer actually printed all my test answers and results, including multiple-choice and algorithm questions, how many times I submitted, how many times I failed). Testing when the virtual pointer is initialized.&lt;/li>
&lt;li>Randomly selected a question on paper. Given preorder traversal ABC and postorder traversal CBA, what is the inorder traversal? Draw out the two possible scenarios.&lt;/li>
&lt;li>The approach to the first algorithm question during the written test (previous Nowcoder test)&lt;/li>
&lt;li>There are 100 marbles, two players take turns, each person can only take 1-5 marbles, the person who cannot take any loses, what is the winning strategy?&lt;/li>
&lt;li>What have you been learning recently (server programming)? What did you learn before (TensorFlow)? How did you learn it? What do you think about TensorFlow&amp;rsquo;s powerful neural networks?&lt;/li>
&lt;li>Family situation.&lt;/li>
&lt;li>After leaving, wrote code in the lobby: find elements in char array a that are not in char array b, and put them in char array c. Here I forgot to convert char characters to unsigned char type.&lt;/li>
&lt;/ul>
&lt;h2 id="second-interview">Second Interview
&lt;/h2>&lt;p>Chengdu, April 13&lt;/p>
&lt;ul>
&lt;li>Self-introduction&lt;/li>
&lt;li>What are system calls? Which system calls have you used? Which system calls take a long time?&lt;/li>
&lt;li>Have you used gdb debugging? What is a conditional breakpoint?&lt;/li>
&lt;li>Difference between function pointers and pointer functions. Write an example.&lt;/li>
&lt;li>Write a fork call example by hand. In what situations have you used fork calls?&lt;/li>
&lt;li>Explain the connect function in UDP.&lt;/li>
&lt;li>What is an index? Is adding more indexes always better? (I admitted to looking at interview experiences for the index question, but came up with the follow-up question myself)&lt;/li>
&lt;li>Which questions from the last interview did you research afterward?&lt;/li>
&lt;li>There was a problem with your code in the last interview, do you know what it was?&lt;/li>
&lt;li>Where did you learn the answers to these questions? What have you been doing these two days?&lt;/li>
&lt;li>Some suggestions for you: look into gdb debugging, database knowledge, network programming, and practice more.&lt;/li>
&lt;/ul>
&lt;h2 id="aftermath">Aftermath
&lt;/h2>&lt;p>Received a phone call on April 20 confirming the offer from Tencent.&lt;/p></description></item><item><title>Tencent Internal Referral Essay</title><link>https://nansenli.com/post/jianshu/%E9%9A%8F%E7%AC%94/%E8%85%BE%E8%AE%AF%E5%86%85%E6%8E%A8%E9%9A%8F%E7%AC%94/</link><pubDate>Mon, 26 Mar 2018 12:23:00 +0000</pubDate><guid>https://nansenli.com/post/jianshu/%E9%9A%8F%E7%AC%94/%E8%85%BE%E8%AE%AF%E5%86%85%E6%8E%A8%E9%9A%8F%E7%AC%94/</guid><description>&lt;p>This afternoon I was browsing Nowcoder. Suddenly I wanted to check on the progress of my Tencent internal referral, and the WeChat official account showed that &amp;ldquo;the current position may not be suitable for you.&amp;rdquo;&lt;/p>
&lt;p>I don&amp;rsquo;t have any special feelings about it.&lt;/p>
&lt;p>I still need to work hard and strive for a good outcome. Regardless, there are still opportunities.&lt;/p>
&lt;p>In the afternoon while doing practice problems, there were 3 out of 8 NetEase questions that I couldn&amp;rsquo;t solve, which made me feel that there are indeed many things I need to learn.&lt;/p>
&lt;p>I bought a lot of books, and I don&amp;rsquo;t know when I&amp;rsquo;ll be able to finish reading them.&lt;/p>
&lt;p>Anyway, I should stay positive.&lt;/p>
&lt;p>The interviewer said I was quite suitable, although that probably made me quite happy, but I won&amp;rsquo;t be sad because I was rejected, nor will I be proud because I was chosen.&lt;/p></description></item><item><title>Excerpts from Nowcoder Interview Experiences</title><link>https://nansenli.com/post/jianshu/%E9%9A%8F%E7%AC%94/%E7%89%9B%E5%AE%A2%E7%BD%91%E9%9D%A2%E7%BB%8F%E9%A2%98%E7%9B%AE%E6%91%98%E6%8A%84/</link><pubDate>Sat, 17 Mar 2018 06:42:00 +0000</pubDate><guid>https://nansenli.com/post/jianshu/%E9%9A%8F%E7%AC%94/%E7%89%9B%E5%AE%A2%E7%BD%91%E9%9D%A2%E7%BB%8F%E9%A2%98%E7%9B%AE%E6%91%98%E6%8A%84/</guid><description>&lt;h2 id="source-alibaba-cainiao-java-internship-phone-interview-experience-failed">Source: Alibaba Cainiao Java Internship Phone Interview Experience, Failed~!~
&lt;/h2>&lt;p>&lt;a class="link" href="https://www.nowcoder.com/discuss/67251?type=2&amp;amp;order=0&amp;amp;pos=7&amp;amp;page=1" target="_blank" rel="noopener"
>https://www.nowcoder.com/discuss/67251?type=2&amp;order=0&amp;pos=7&amp;page=1&lt;/a>&lt;/p>
&lt;p>Java-specific questions removed&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Is a user request handled by one thread per request on the server?
After searching, I found there are two models: blocking and non-blocking. Nowadays, technology based on I/O multiplexing is generally used, like the Reactor pattern, which only needs one thread or a small number of threads to handle a large number of requests.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Server pressure handling strategies
This is an even bigger question. After searching on Baidu, there are two points: caching and distributed systems. A netizen answered with message queues, which can alleviate situations with sudden large concurrent volumes.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Finding the top ten numbers among many numbers
Can use a variant of quicksort&lt;/p>
&lt;/li>
&lt;li>
&lt;p>How is the time complexity of heap sort calculated?
n×log n, which is n times, each time extracting from the heap bottom to top takes log n times&lt;/p>
&lt;/li>
&lt;li>
&lt;p>HTTP and TCP
Not sure what specifically was being asked, perhaps the relationship?&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Why are four steps needed to close a TCP connection (four-way handshake)?
Two FIN+ACK, with unsent data inserted in the middle. In situations with delayed ACK.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h2 id="source-netease-internal-referral-cc-development-offer-journey">Source: NetEase Internal Referral (C++/C Development) Offer Journey
&lt;/h2>&lt;p>&lt;a class="link" href="https://www.nowcoder.com/discuss/3038?type=2&amp;amp;order=0&amp;amp;pos=15&amp;amp;page=4" target="_blank" rel="noopener"
>https://www.nowcoder.com/discuss/3038?type=2&amp;order=0&amp;pos=15&amp;page=4&lt;/a>&lt;/p>
&lt;ul>
&lt;li>What forms of polymorphism exist in C++?
Polymorphism is one interface with multiple implementations. Static polymorphism and dynamic polymorphism. Static polymorphism is implemented through generic programming, dynamic polymorphism is implemented through virtual functions.&lt;/li>
&lt;li>How is dynamic binding implemented?
Static binding: compile-time binding, called through objects
Dynamic binding: runtime binding, implemented through addresses
Dynamic binding is implemented through virtual tables.&lt;/li>
&lt;li>What types of type conversions are there?
C-style conversions, explicit type casting, implicit type conversion. C++ has four types of type conversions: static_cast, const_cast, dynamic_cast, reinterpret_cast. They are used for built-in static type conversion (int, float), removing the const property of a type, dynamic type conversion (must be parent-child classes), and reinterpreting types without substantive conversion (pointer forced conversion), respectively.&lt;/li>
&lt;li>Memory alignment principles
The basic data type members of a structure must start aligned at integer multiples of the member size, structures as members must align at integer multiples of the widest data type. The size of a structure is aligned at integer multiples of its largest internal member.&lt;/li>
&lt;li>How are templates implemented?
The compiler remembers the template name when encountering a template declaration. When called, it generates specific type code based on the parameter types passed to the template, then compiles it.&lt;/li>
&lt;li>Uses of pointers and const?
Const type pointers, pointers to const type, const type pointers to const type.&lt;/li>
&lt;li>Virtual functions, pure virtual functions, virtual functions and destructors? Why should destructors be defined as virtual functions?
&lt;a class="link" href="http://liaoxl.github.io/blog/20131205/virtual-destructor/" target="_blank" rel="noopener"
>http://liaoxl.github.io/blog/20131205/virtual-destructor/&lt;/a>
According to this article, if defined as a virtual function and the child class also implements it, both the child class destructor and the parent class destructor will be called.&lt;/li>
&lt;li>Inline functions&lt;/li>
&lt;li>const and typedef&lt;/li>
&lt;li>What sorting algorithms are there? How is quicksort implemented? Best-case time complexity, average time complexity.
Insertion, bubble, heap sort, merge sort, bucket sort, shell sort, quicksort.&lt;/li>
&lt;li>What is extern &amp;ldquo;C&amp;rdquo; used for?
Mainly used to call programs written in C.&lt;/li>
&lt;/ul>
&lt;h2 id="2017-summer-internship-c-interview-experience-alibaba-netease-games-tencent-etc">2017 Summer Internship C++ Interview Experience (Alibaba, NetEase Games, Tencent, etc.)
&lt;/h2>&lt;p>Source: &lt;a class="link" href="https://www.nowcoder.com/discuss/23512?type=2&amp;amp;order=0&amp;amp;pos=20&amp;amp;page=2" target="_blank" rel="noopener"
>https://www.nowcoder.com/discuss/23512?type=2&amp;order=0&amp;pos=20&amp;page=2&lt;/a>&lt;/p>
&lt;ul>
&lt;li>How is map implemented? What are the differences between red-black trees and AVL trees? Why do data structures like map and set use red-black trees for implementation? Have you heard of skip-list?&lt;/li>
&lt;li>Have you used vector.reserve()? How does the vector array grow?&lt;/li>
&lt;li>Are you familiar with map-reduce?&lt;/li>
&lt;li>Are you familiar with Linux? Directory permissions, what does 644 represent? What does executable permission for a directory represent?&lt;/li>
&lt;li>Do you regularly use vi? Are you familiar with common Linux commands? (like awk, grep, etc.) Have you used gdb for debugging?&lt;/li>
&lt;li>What are the differences between TCP/UDP? How is congestion control implemented? How is reliable transmission implemented? Applications of UDP?
Reliable/Unreliable, Byte stream/Datagram, Connection-oriented/Connectionless, High overhead/Low overhead, With congestion control/Without congestion control, Full-duplex/Simplex
The purpose of congestion control is to prevent sending data packets beyond the network&amp;rsquo;s capacity, involving all hosts and routers. Congestion control assumes packet loss occurs when data packets exceed the network&amp;rsquo;s capacity, so when sending data packets, it needs to start slowly, gradually reaching the network&amp;rsquo;s capacity, increasing the congestion window exponentially to the slow start threshold, then entering congestion avoidance state where the congestion window grows linearly until congestion occurs. If a data packet&amp;rsquo;s ACK is not received before the timeout timer expires, it&amp;rsquo;s assumed that congestion has occurred, then the slow start threshold is set to half the current window size, and the slow start algorithm is executed. If three duplicate ACK packets are received, it&amp;rsquo;s assumed the lost packet hasn&amp;rsquo;t been received, so the unacknowledged packet is retransmitted early rather than waiting for the timeout timer to expire - this is fast retransmit. In case of fast retransmit, the slow start algorithm isn&amp;rsquo;t executed; instead, the congestion window is set to the slow start threshold, then congestion avoidance is executed - this is fast recovery.&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>Author: Simon_
Link: &lt;a class="link" href="https://www.nowcoder.com/discuss/23512?type=2&amp;amp;order=0&amp;amp;pos=20&amp;amp;page=2" target="_blank" rel="noopener"
>https://www.nowcoder.com/discuss/23512?type=2&amp;amp;order=0&amp;amp;pos=20&amp;amp;page=2&lt;/a>
Source: Nowcoder&lt;/p>
&lt;p>Summary:&lt;/p>
&lt;p>I think Alibaba focuses more on projects, distributed systems, and multithreading knowledge. NetEase Games seems to focus more on algorithms and C++. Tencent asks about everything, from C++ memory structure, RTTI, to network programming, to algorithm implementation for brain teasers. You can prepare better based on the company you&amp;rsquo;re applying to. Let&amp;rsquo;s work hard together.&lt;/p>
&lt;p>Books I read before preparing for internships include &amp;ldquo;C++ Primer&amp;rdquo;, &amp;ldquo;Inside the C++ Object Model&amp;rdquo;, &amp;ldquo;Effective C++&amp;rdquo;, &amp;ldquo;The Annotated STL Sources&amp;rdquo;, &amp;ldquo;Coding Interviews&amp;rdquo;, plus some books on networking and operating systems. I also solved the first 120 problems on LeetCode.&lt;/p>
&lt;/blockquote>
&lt;p>&lt;strong>Some advice for juniors and sophomores looking for C++ development internships:&lt;/strong>&lt;/p>
&lt;blockquote>
&lt;ol>
&lt;li>It&amp;rsquo;s best to go through C++ Primer several times before looking for internships. Make notes on things you don&amp;rsquo;t understand for future reference. When you read &amp;ldquo;The Object Model&amp;rdquo;, you&amp;rsquo;ll find that concepts you couldn&amp;rsquo;t understand in Primer will become clear. (For Primer study methods, I followed the first answer in &lt;a class="link" href="https://www.zhihu.com/question/32087709" target="_blank" rel="noopener"
>https://www.zhihu.com/question/32087709&lt;/a>)&lt;/li>
&lt;li>It&amp;rsquo;s also good to read &amp;ldquo;The Annotated STL Sources&amp;rdquo;. Interviewers love to ask about the underlying implementation or dynamic growth of vector, map, etc. It might be difficult to understand these concepts just by reading blogs and interview experiences.&lt;/li>
&lt;li>&amp;ldquo;Coding Interviews&amp;rdquo; covers algorithm questions for most companies&amp;rsquo; first interviews. I think it&amp;rsquo;s best to understand each problem. The first 100 problems on LeetCode are indeed very classic, and you can reinforce your knowledge of binary search, hash, dynamic programming, binary trees, etc. through practice.&lt;/li>
&lt;li>For networking, TCP/IP Illustrated Volume 1 is essential, and if you have time, you can also read Unix Network Programming. If you have even more time, it&amp;rsquo;s best to read through Chen Shuo&amp;rsquo;s &amp;ldquo;Linux Multithreaded Server Programming&amp;rdquo; to gain an understanding of multithreading.&lt;/li>
&lt;li>The final piece of advice is to prepare as early as possible. During the resume submission and interview period, it&amp;rsquo;s only suitable to organize Nowcoder interview experiences and your own experiences, filling in knowledge gaps. After all, interview questions are random, and to perform better in interviews, it&amp;rsquo;s best to accumulate knowledge regularly.&lt;/li>
&lt;/ol>
&lt;/blockquote>
&lt;h2 id="cc-backend-development-tencent-internship-spring-recruitment-first-interview-failed">C/C++ Backend Development Tencent Internship Spring Recruitment First Interview, Failed~
&lt;/h2>&lt;p>&lt;a class="link" href="https://www.nowcoder.com/discuss/68508?type=0&amp;amp;order=0&amp;amp;pos=8&amp;amp;page=0" target="_blank" rel="noopener"
>https://www.nowcoder.com/discuss/68508?type=0&amp;order=0&amp;pos=8&amp;page=0&lt;/a>&lt;/p>
&lt;ul>
&lt;li>The underlying implementation of vector. I talked a lot about this, so he asked what specific actions insert performs, what resize function calls, and expansion situations.&lt;/li>
&lt;li>Inter-process communication mechanisms
Pipe, Named pipe (FIFO)
Signal
Message queue
Shared memory
Semaphore
Socket&lt;/li>
&lt;/ul>
&lt;h2 id="alibaba-cainiao-network-second-interview">Alibaba Cainiao Network Second Interview
&lt;/h2>&lt;p>&lt;a class="link" href="http://blog.csdn.net/caishenfans/article/details/44496581" target="_blank" rel="noopener"
>http://blog.csdn.net/caishenfans/article/details/44496581&lt;/a>&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Difference between fill and memset
fill is an STL algorithm that calls the copy constructor; for basic types, it should directly copy bit by bit. memset is a C algorithm that copies byte by byte to the position pointed to by the original pointer.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>C++ memory management methods
RAII stands for Resource Acquisition Is Initialization
It utilizes the guarantee that destructors of stack objects will be automatically called during stack unwinding to correctly release previously acquired resources. RAII only works properly if stack unwinding executes normally. Both function calls and normal C++ exception handling flow (exceptions within try-catch blocks) involve stack unwinding.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Implementation of smart pointers
When another smart pointer copies the current smart pointer, the reference counter increments by 1.
When assignment occurs between two smart pointers, the reference count of the object pointed to by the left pointer decrements by 1, and the right one increments by 1.
At destruction, the reference count similarly decrements by 1.
When the reference count reaches 0, the object is reclaimed.
A set of operators is redefined: -&amp;gt; pointer, returns a pointer to the original pointer. Dereference *T, returns the dereference of the original pointer.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h2 id="alibaba-internship-phone-interview-experience-over-an-hour">Alibaba Internship Phone Interview Experience, Over an Hour
&lt;/h2>&lt;p>&lt;a class="link" href="https://www.nowcoder.com/discuss/3836" target="_blank" rel="noopener"
>https://www.nowcoder.com/discuss/3836&lt;/a>&lt;/p>
&lt;ul>
&lt;li>What is a binary balanced tree, how to insert nodes, delete nodes, describe the key steps.&lt;/li>
&lt;/ul>
&lt;h2 id="how-students-can-get-an-alibaba-technical-offer-alibaba-internship-interview-experience-successful">How Students Can Get an Alibaba Technical Offer: &amp;ldquo;Alibaba Internship Interview Experience (Successful)&amp;rdquo;
&lt;/h2>&lt;p>&lt;a class="link" href="https://yq.aliyun.com/articles/6395" target="_blank" rel="noopener"
>https://yq.aliyun.com/articles/6395&lt;/a>&lt;/p>
&lt;h2 id="alibaba-c-development-internship-second-and-third-interview-experience-failed">Alibaba C++ Development Internship Second and Third Interview Experience (Failed)
&lt;/h2>&lt;p>&lt;a class="link" href="https://www.nowcoder.com/discuss/27801?type=2&amp;amp;order=3&amp;amp;pos=55&amp;amp;page=1" target="_blank" rel="noopener"
>https://www.nowcoder.com/discuss/27801?type=2&amp;order=3&amp;pos=55&amp;page=1&lt;/a>&lt;/p>
&lt;h2 id="internship-interview-summary">Internship Interview Summary
&lt;/h2>&lt;p>&lt;a class="link" href="https://www.nowcoder.com/discuss/25302?type=2&amp;amp;order=3&amp;amp;pos=190&amp;amp;page=1" target="_blank" rel="noopener"
>https://www.nowcoder.com/discuss/25302?type=2&amp;order=3&amp;pos=190&amp;page=1&lt;/a>&lt;/p>
&lt;h2 id="zhihu-and-nowcoder-summary">Zhihu and Nowcoder Summary
&lt;/h2>&lt;p>&lt;a class="link" href="http://link.zhihu.com/?target=https%3A//www.nowcoder.com/discuss/27801%3Ftype%3D2%26order%3D3%26pos%3D55%26page%3D1" target="_blank" rel="noopener"
>Alibaba C++ Development Internship Second and Third Interview Experience (Failed)&lt;/a>&lt;/p>
&lt;p>&lt;a class="link" href="http://link.zhihu.com/?target=https%3A//www.nowcoder.com/discuss/27739%3Ftype%3D2%26order%3D3%26pos%3D57%26page%3D2" target="_blank" rel="noopener"
>30 Interview Experiences for [Alibaba, Tencent, ByteDance] and 12 Other Companies in [C++ Direction]&lt;/a>&lt;/p>
&lt;p>&lt;a class="link" href="http://link.zhihu.com/?target=https%3A//www.nowcoder.com/discuss/27616%3Ftype%3D2%26order%3D3%26pos%3D61%26page%3D1" target="_blank" rel="noopener"
>Alibaba Campus Recruitment Internship First Interview Experience&lt;/a>&lt;/p>
&lt;p>&lt;a class="link" href="http://link.zhihu.com/?target=https%3A//www.nowcoder.com/discuss/27349%3Ftype%3D2%26order%3D3%26pos%3D71%26page%3D1" target="_blank" rel="noopener"
>Goodbye to Alibaba Autumn Recruitment&lt;/a>&lt;/p>
&lt;p>&lt;a class="link" href="http://link.zhihu.com/?target=https%3A//www.nowcoder.com/discuss/26107%3Ftype%3D2%26order%3D3%26pos%3D125%26page%3D1" target="_blank" rel="noopener"
>Baidu Three Interviews (Offer) &amp;amp;&amp;amp; Alibaba Four Interviews (In Progress)&lt;/a>&lt;/p>
&lt;p>&lt;a class="link" href="http://link.zhihu.com/?target=https%3A//www.nowcoder.com/discuss/25923%3Ftype%3D2%26order%3D3%26pos%3D143%26page%3D1" target="_blank" rel="noopener"
>Non-Key University Junior Spring Recruitment Internship Interview Experience&lt;/a>&lt;/p>
&lt;p>&lt;a class="link" href="http://link.zhihu.com/?target=https%3A//www.nowcoder.com/discuss/25302%3Ftype%3D2%26order%3D3%26pos%3D190%26page%3D1" target="_blank" rel="noopener"
>Internship Interview Summary&lt;/a>&lt;/p>
&lt;p>&lt;a class="link" href="http://link.zhihu.com/?target=https%3A//www.nowcoder.com/discuss/24900%3Ftype%3D2%26order%3D3%26pos%3D230%26page%3D1" target="_blank" rel="noopener"
>Alibaba, Morgan, Nomura, Tencent, Microsoft, TuDuck Technology Interview Experience Sharing&lt;/a>&lt;/p>
&lt;p>&lt;a class="link" href="http://link.zhihu.com/?target=http%3A//www.nowcoder.com/discuss/8343%3Ftype%3D0%26order%3D3%26pos%3D3950%26page%3D1%26from%3Dmnks201" target="_blank" rel="noopener"
>Alibaba Four Interview Experiences + Successfully Received Offer&lt;/a>&lt;/p>
&lt;p>&lt;a class="link" href="http://link.zhihu.com/?target=https%3A//www.nowcoder.com/discuss/18460%3Ftype%3D2%26order%3D3%26pos%3D57%26page%3D2%26from%3Dmnks201" target="_blank" rel="noopener"
>My 2016 Written Test and Interview Experience (For Next Year&amp;rsquo;s Juniors and Sophomores)&lt;/a>&lt;/p>
&lt;h2 id="alibaba-2017-internship-interview-sharing-three-technical-interviews--hr-interview">Alibaba 2017 Internship Interview Sharing (Three Technical Interviews + HR Interview)
&lt;/h2>&lt;p>&lt;a class="link" href="https://www.nowcoder.com/discuss/25446" target="_blank" rel="noopener"
>https://www.nowcoder.com/discuss/25446&lt;/a>&lt;/p></description></item><item><title>Cainiao B2B First Interview Experience Record, C++ Backend Development</title><link>https://nansenli.com/post/jianshu/%E9%9A%8F%E7%AC%94/%E8%8F%9C%E9%B8%9Fb2b%E9%9D%A2%E8%AF%95%E4%B8%80%E9%9D%A2%E7%BB%8F%E5%8E%86%E8%AE%B0%E5%BD%95c++%E5%90%8E%E5%8F%B0%E5%BC%80%E5%8F%91/</link><pubDate>Fri, 09 Mar 2018 02:30:00 +0000</pubDate><guid>https://nansenli.com/post/jianshu/%E9%9A%8F%E7%AC%94/%E8%8F%9C%E9%B8%9Fb2b%E9%9D%A2%E8%AF%95%E4%B8%80%E9%9D%A2%E7%BB%8F%E5%8E%86%E8%AE%B0%E5%BD%95c++%E5%90%8E%E5%8F%B0%E5%BC%80%E5%8F%91/</guid><description>&lt;h2 id="introduction">Introduction
&lt;/h2>&lt;p>I&amp;rsquo;m a second-year master&amp;rsquo;s student, and my advisor doesn&amp;rsquo;t allow internships, but I interviewed for spring internships to gain interview experience.
My resume is very simple and modest, so the interviewer&amp;rsquo;s questions were relatively easy. The first interview was scheduled for 7 PM on March 8, 2018. Since I was doing an Alibaba test the night before, the interviewer said the interview would be postponed by one day, which gave me time to prepare. I especially reviewed basic knowledge again, which was very helpful.&lt;/p>
&lt;h2 id="self-introduction">Self-introduction
&lt;/h2>&lt;ul>
&lt;li>Omitted&lt;/li>
&lt;/ul>
&lt;h2 id="project-experience-and-its-impact-on-you">Project experience and its impact on you
&lt;/h2>&lt;ul>
&lt;li>Omitted&lt;/li>
&lt;/ul>
&lt;h2 id="what-are-the-four-layers-of-network-architecture">What are the four layers of network architecture?
&lt;/h2>&lt;ul>
&lt;li>I answered the physical layer which includes fiber optics, switches, and twisted pairs; the network layer with IP; the transport layer with TCP, ICMP, and UDP; and the application layer with HTTP and DNS.&lt;/li>
&lt;li>Standard answer: Actually, the TCP/IP standard does not define functionalities corresponding to the ISO data link layer and physical layer. Instead, it defines protocols like the Address Resolution Protocol (ARP), which provides interfaces between TCP/IP protocol data structures and actual physical hardware. So the first layer should be the link layer, which includes the ARP protocol and device drivers.&lt;/li>
&lt;/ul>
&lt;h2 id="which-layer-are-you-most-familiar-with">Which layer are you most familiar with?
&lt;/h2>&lt;ul>
&lt;li>I answered the transport layer with the TCP protocol.&lt;/li>
&lt;/ul>
&lt;h2 id="what-are-the-differences-between-tcp-and-udp">What are the differences between TCP and UDP?
&lt;/h2>&lt;ul>
&lt;li>Omitted&lt;/li>
&lt;/ul>
&lt;h2 id="three-way-handshake-and-four-way-termination">Three-way handshake and four-way termination?
&lt;/h2>&lt;ul>
&lt;li>Omitted&lt;/li>
&lt;/ul>
&lt;h2 id="why-are-you-familiar-with-this-process">Why are you familiar with this process?
&lt;/h2>&lt;ul>
&lt;li>I answered that I mainly learned it from books. Of course, I also used it in projects and observed the process by capturing packets with tcpdump and Wireshark.&lt;/li>
&lt;/ul>
&lt;h2 id="how-does-io-multiplexing-work">How does I/O multiplexing work?
&lt;/h2>&lt;ul>
&lt;li>
&lt;p>I answered that it&amp;rsquo;s because multithreading is resource-intensive, etc. After listening for a while, the interviewer said that&amp;rsquo;s not what they meant; they wanted to know the implementation principle of I/O multiplexing. I replied that I had forgotten, but I remembered that in the implementation process of select, poll, and epoll, efficient data structures are used to check which file descriptor has I/O operations.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The standard answer is:&lt;/p>
&lt;blockquote>
&lt;p>The efficiency of epoll lies in the fact that when we call epoll_ctl to insert millions of handles, epoll_wait can still return quickly and effectively give us the handles with events. This is because when we call epoll_create, the kernel not only creates a file node in the epoll file system for us and builds a red-black tree in the kernel cache to store the sockets passed by epoll_ctl later, but also establishes a list to store ready events. When epoll_wait is called, it only needs to observe whether there is data in this list. If there is data, it returns; if there is no data, it sleeps until it returns when the timeout time arrives, even if the list has no data. Therefore, epoll_wait is very efficient.
Another fatal weakness of traditional select/poll is that when you have a large socket collection, due to network latency, only part of the sockets are &amp;ldquo;active&amp;rdquo; at any time, but select/poll will linearly scan the entire collection for each call, causing efficiency to decrease linearly. However, epoll does not have this problem; it only operates on &amp;ldquo;active&amp;rdquo; sockets - this is because in the kernel implementation, epoll is implemented based on the callback function on each fd. Therefore, only &amp;ldquo;active&amp;rdquo; sockets will actively call the callback function, while other idle state sockets will not.&lt;/p>
&lt;/blockquote>
&lt;/li>
&lt;/ul>
&lt;h2 id="explain-polymorphism-in-c">Explain polymorphism in C++
&lt;/h2>&lt;ul>
&lt;li>Omitted&lt;/li>
&lt;/ul>
&lt;h2 id="what-is-a-destructor-and-what-is-its-purpose">What is a destructor and what is its purpose?
&lt;/h2>&lt;ul>
&lt;li>Omitted&lt;/li>
&lt;/ul>
&lt;h2 id="what-is-the-purpose-of-a-virtual-destructor">What is the purpose of a virtual destructor?
&lt;/h2>&lt;ul>
&lt;li>Omitted&lt;/li>
&lt;/ul>
&lt;h2 id="should-the-parent-classs-destructor-be-set-as-a-virtual-function">Should the parent class&amp;rsquo;s destructor be set as a virtual function?
&lt;/h2>&lt;ul>
&lt;li>Definitely yes&lt;/li>
&lt;/ul>
&lt;h2 id="what-is-the-difference-between-shallow-copy-and-deep-copy">What is the difference between shallow copy and deep copy?
&lt;/h2>&lt;ul>
&lt;li>Omitted&lt;/li>
&lt;/ul>
&lt;h2 id="if-a-function-accepts-an-object-as-a-parameter-is-that-a-shallow-copy-or-a-deep-copy">If a function accepts an object as a parameter, is that a shallow copy or a deep copy?
&lt;/h2>&lt;ul>
&lt;li>I answered that it depends on the copy constructor. But I wasn&amp;rsquo;t sure about the specifics.&lt;/li>
&lt;li>The standard answer should be: if references or pointers are used, no copying occurs. If the passed class hasn&amp;rsquo;t implemented a copy constructor, it&amp;rsquo;s a shallow copy. If it has implemented a copy constructor, it depends on whether the implemented copy constructor performs a shallow or deep copy.&lt;/li>
&lt;/ul>
&lt;h2 id="what-is-a-pointer-in-c-language">What is a pointer in C language?
&lt;/h2>&lt;ul>
&lt;li>I answered that it&amp;rsquo;s first a variable that stores the address of the internal data type or object it points to. Dereferencing it retrieves the data or object.&lt;/li>
&lt;li>In fact, a pointer is not necessarily a variable; there are also constant pointers, but generally, &amp;ldquo;pointer&amp;rdquo; is short for &amp;ldquo;pointer variable.&amp;rdquo; So the above expression doesn&amp;rsquo;t have any issues.&lt;/li>
&lt;/ul>
&lt;h2 id="what-is-the-difference-between-formal-parameters-and-actual-parameters">What is the difference between formal parameters and actual parameters?
&lt;/h2>&lt;ul>
&lt;li>Honestly, I wasn&amp;rsquo;t clear about this either. I said I didn&amp;rsquo;t know but explained pointers, references, and regular parameter passing.&lt;/li>
&lt;li>Later I found out that actual parameters (arguments) refer to the parameters passed in when an external function is called, and formal parameters are the parameters used when processing inside the function.&lt;/li>
&lt;/ul>
&lt;h2 id="introduce-the-simulated-annealing-algorithm">Introduce the simulated annealing algorithm
&lt;/h2>&lt;ul>
&lt;li>Because it was mentioned on my resume&lt;/li>
&lt;/ul>
&lt;h2 id="what-is-entropy-and-what-does-an-increase-represent">What is entropy, and what does an increase represent?
&lt;/h2>&lt;ul>
&lt;li>Omitted&lt;/li>
&lt;/ul>
&lt;h2 id="the-department-primarily-uses-java-development-would-you-be-resistant-if-asked-to-do-java-development">The department primarily uses Java development. Would you be resistant if asked to do Java development?
&lt;/h2>&lt;ul>
&lt;li>Omitted&lt;/li>
&lt;/ul>
&lt;h2 id="what-would-you-like-to-know-about-the-company">What would you like to know about the company?
&lt;/h2>&lt;ul>
&lt;li>Omitted&lt;/li>
&lt;/ul>
&lt;h2 id="aftermath">Aftermath
&lt;/h2>&lt;p>Total duration was 27 minutes. I spoke rather quickly and was a bit nervous and excited. That&amp;rsquo;s about it, and I&amp;rsquo;ll add more if I remember anything else.&lt;/p></description></item></channel></rss>