
笔试面试题
文章平均质量分 66
ljh0302
软件研发工程师
后端Java,前端Angular
展开
-
Leetcode-Dynamic Programming题目总结
动态规划Dynamic Programming:通过把原问题分解为相对简单的子问题的方法来求解复杂问题的方法。把求解的问题分成多个阶段或多个子问题,然后按照顺序求解各子问题。前一子问题的解,为后一问题的求解提供了有用信息。依次解决各个子问题,最后一个阶段的解就是初始问题的解。动态规划问题,大致可以通过以下4个步骤:1)划分状态,即划分子问题2)状态表示,即如何让计算机理解子问题。...原创 2020-03-17 11:21:11 · 638 阅读 · 0 评论 -
Leetcode-backtracking题目总结
Leetcode-78.Subsets (全组合问题)Given a set ofdistinctintegers,nums, return all possible subsets (the power set).Note:The solution set must not contain duplicate subsets.Input: nums = [1,2,3] O...原创 2020-02-28 12:10:40 · 406 阅读 · 0 评论 -
[leetcode]-30-Substring with Concatenation of All Words
题目:You are given a string,s, and a list of words,words, that are all of the same length. Find all starting indices of substring(s) insthat is a concatenation of each word inwordsexactly once a...原创 2020-02-05 16:10:24 · 546 阅读 · 0 评论 -
[leetcode]-238. Product of Array Except Self
题目:Given an arraynumsofnintegers wheren> 1, return an arrayoutputsuch thatoutput[i]is equal to the product of all the elements ofnumsexceptnums[i].Example:Input: [1,2,3,4]Out...原创 2020-02-05 15:17:02 · 210 阅读 · 0 评论 -
[leetcode]-523-Continuous Subarray Sum
题目:Given a list ofnon-negativenumbers and a targetintegerk, write a function to check if the array has a continuous subarray of size at least 2 that sums up to a multiple ofk, that is, sums up ...原创 2020-02-03 20:13:56 · 285 阅读 · 0 评论 -
[leetcode]-525. Contiguous Array
题目:Given a binary array, find the maximum length of a contiguous subarray with equal number of 0 and 1.Example 1:Input: [0,1]Output: 2Explanation: [0, 1] is the longest contiguous subarray wi...原创 2020-02-03 20:07:32 · 192 阅读 · 0 评论 -
[leetcode]-954. Array of Doubled Pairs
题目:Given an array of integersAwith even length, returntrueif and only if it is possible to reorder it such thatA[2 * i + 1] = 2 * A[2 * i]for every0 <=i < len(A) / 2.示例:Input: [4,...原创 2020-02-01 20:22:34 · 209 阅读 · 0 评论 -
[leetcode]-1293 Shortest Path in a Grid with Obstacles Elimination
题目:Given am * ngrid, where each cell is either0(empty)or1(obstacle).In one step, you can move up, down, left or right from and to an empty cell.Return the minimum number of steps to walk f...原创 2020-01-09 21:25:43 · 556 阅读 · 0 评论 -
[leetcode]-460 LFU Cache
题目:Design and implement a data structure forLeast Frequently Used (LFU)cache. It should support the following operations:getandput.get(key)- Get the value (will always be positive) of the ke...原创 2020-01-07 21:06:52 · 228 阅读 · 0 评论 -
网络笔试面试题整理
1、OSI,TCP/IP五层协议的体系结构以及各层协议OSI分层:物理层、数据链路层、网络层、传输层、会话层、表示层、应用层物理层:中继器、集线路、网关 (媒体传输比特Bit)数据链路层:PPP、VLAN、MAC (把比特组装成帧和点到点的传输Frame)网络层:IP、ICMP、ARP、OSPF、路由器 (负责数据包从源到宿的传递 Packet)传输层:TCP、UDP (提供端...原创 2018-08-06 17:09:08 · 1297 阅读 · 0 评论 -
常见设计模式笔试面试题
设计模式一套被反复使用,多数人知晓的代码设计经验的总结,实现可重用代码,使代码更容易被理解,保证代码可靠性。总体来说,设计模式分为三大类:创建型模式(五种):工厂方法模式、抽象工厂模式、单例模式、建造者模式、原型模式结构型模式(七种):适配器模式、装饰器模式、代理模式、外观模式、桥接模式、组合模式、享元模式行为型模式(十一种):策策略模式、模板方法模式、观察者模式、迭代子模式、责任...原创 2018-08-10 15:45:46 · 36470 阅读 · 1 评论 -
常见数据结构笔试面试题
1、什么平衡二叉树?平衡二叉树,是一种二叉排序树,其中每个结点的左子树和右子树的高度差至多等于1。它是一种高度平衡的二叉排序树。高度平衡?意思是说,要么它是一棵空树,要么它的左子树和右子树都是平衡二叉树,且左子树和右子树的深度之差的绝对值不超过1。2、什么是红黑树?3、...原创 2018-08-01 15:36:18 · 3166 阅读 · 0 评论 -
常见操作系统笔试面试题整理
1、进程和线程的区别和联系1)进程是操作系统进行资源分配的基本单位,线程是CPU调度的基本单位2)一个进程可以包含多个线程,线程间共享进程的所有资源,每个线程都自己的堆栈和局部变量3)进行有自己的独立的地址空间,每启动一个进程,系统就会为它分配空间,建立数据表来维护代码段、堆栈段和数据段,这种操作非常昂贵;而线程共享进程中的数据,使用相同的地址空间,因此CPU切换一个线程的花费更低...原创 2018-07-30 16:49:05 · 2408 阅读 · 0 评论 -
经典算法面试题
1、如何判断链表中是否有环?如果有环的话,如何找出环的入口设置两个指针,一个fast指针,一个slow指针,fast指针每次走两步,slow指针每次走一步,若fast和slow相遇,则链表有环设x为slow走的步数,则2x = x + n,n为环的大小,则相遇时,slow走了n步则表头到环入口的距离 = 相遇点到环入口的距离于是在相遇点,将fast指针移动到表头,每次走一步,和sl...原创 2018-07-20 16:56:40 · 1393 阅读 · 0 评论 -
常见C++笔试面试题整理
1、C和C++的区别1)C是面向过程的语言,是一个结构化的语言,考虑如何通过一个过程对输入进行处理得到输出;C++是面向对象的语言,主要特征是“封装、继承和多态”。封装隐藏了实现细节,使得代码模块化;派生类可以继承父类的数据和方法,扩展了已经存在的模块,实现了代码重用;多态则是“一个接口,多种实现”,通过派生类重写父类的虚函数,实现了接口的重用。2)C和C++动态管理内存的方法不一样,C是...原创 2018-07-19 16:39:23 · 104665 阅读 · 10 评论