自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Mapoos

从零开始

  • 博客(304)
  • 收藏
  • 关注

原创 2020暑假实习-美团前端二面

2020暑假实习-美团前端二面因为不是科班出身,所以跳过了很多基础问题。https的红锁和绿锁(证书认证,CA认证机构的公钥是放在操作系统里的)localStorage满了怎么办 indexDB(不懂,提了清空或者放到sessionStorage)加载页面长时间白屏,怎么分析这个问题(不懂,只说了一个dns污染之类的问题)拉平数组(直接用ES6的flat函数,或者递归...

2020-04-21 12:35:16 525

原创 2020暑假实习-腾讯TEG前端二面

2020暑假实习-腾讯TEG前端二面机试部分一、简答题1. 常用的浏览器内核:webkitblinkgeckotrident…2. 外边距重叠外边距重叠是指两个连续的元素,它们各自具有的margin会覆盖对方的margin,造成最终显示在浏览器上的效果是只存在较大的margin(不存在外边距重叠的话则会显示为两者的margin之和)3. CSS3属性opacityt...

2020-04-16 13:34:02 684 1

原创 2020暑假实习-美团前端一面

美团前端一面介绍一下promise如何网页优化;为什么减少请求数可以优化网页(同域名请求数有限,减少排队时间)promise实现xhr二分法实现开根如何判断js数组的底层是数组还是链表(我的方法是自己写一个链表实现的array,与原生的Array都使用同样的数据同样的操作,最后对比执行时间判断)node是如何保证可用性的(pm2)instanceof和typeof的区别有哪几种链...

2020-04-15 12:33:15 344

原创 2020暑假实习-腾讯TEG前端一面

腾讯TEG前端一面CSS切图会不会(不会…)HTTP 状态码(1xx-5xx)js如何获取字符串的最后三位(遍历 substring slice split 但应该还有更多)ES6新特性Promise原理(问的是事件循环)Vue计算属性的原理(如何实现监听和变化,没答出来,defineProperty?)let和var的区别(变量提升,重复声明,暂时性死区)js的基础类型(6种...

2020-04-13 03:15:44 590

原创 2020暑假实习-百度前端一面&二面&三面

百度前端一面&二面&三面一面算法题:JS实现二分搜索、随机打乱数组HTML:cookie、localStorage、sessionStorage区别标签页之间的通信(cookie+setInterval,localStorage,websocket)CSS:position介绍(5种)行级元素、块级元素的区别;input、img能否调整宽高(input实际...

2020-04-12 15:23:05 1139 1

原创 1405. Longest Happy String (M)

Longest Happy String (M)A string is called happy if it does not have any of the strings 'aaa', 'bbb' or 'ccc' as a substring.Given three integers a, b and c, return any string s, which satisfies fol...

2020-04-06 08:21:26 510

原创 1404. Number of Steps to Reduce a Number in Binary Representation to One (M)

Number of Steps to Reduce a Number in Binary Representation to One (M)Given a number s in their binary representation. Return the number of steps to reduce it to 1 under the following rules:If the ...

2020-04-06 06:43:52 153

原创 1403. Minimum Subsequence in Non-Increasing Order (E)

Minimum Subsequence in Non-Increasing Order (E)Given the array nums, obtain a subsequence of the array whose sum of elements is strictly greater than the sum of the non included elements in such subs...

2020-04-05 14:54:35 196

原创 332. Reconstruct Itinerary (M)

Reconstruct Itinerary (M)Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order. All of the tickets belong to a man who ...

2020-03-30 05:32:24 151

原创 1396. Design Underground System M

Design Underground System (M)Implement the class UndergroundSystem that supports three methods:1.checkIn(int id, string stationName, int t)A customer with id card equal to id, gets in the station ...

2020-03-30 02:16:08 295

原创 1395. Count Number of Teams (M)

Count Number of Teams (M)There are n soldiers standing in a line. Each soldier is assigned a unique rating value.You have to form a team of 3 soldiers amongst them under the following rules:Choose...

2020-03-30 01:51:49 271

原创 1394. Find Lucky Integer in an Array (E)

Find Lucky Integer in an Array (E)Given an array of integers arr, a lucky integer is an integer which has a frequency in the array equal to its value.Return a lucky integer in the array. If there ar...

2020-03-30 01:37:29 273

原创 28. Implement strStr() (E)

Implement strStr() (E)Implement strStr().Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Example 1:Input: haystack = "hello", needle = "ll"...

2020-03-23 07:09:51 85

原创 1391. Check if There is a Valid Path in a Grid (M)

Check if There is a Valid Path in a Grid (M)Given a m x n grid. Each cell of the grid represents a street. The street of grid[i][j] can be:1 which means a street connecting the left cell and the ri...

2020-03-23 06:17:06 388

原创 1392. Longest Happy Prefix (H)

Longest Happy Prefix (H)A string is called a happy prefix if is a non-empty prefix which is also a suffix (excluding itself).Given a string s. Return the longest happy prefix of s .Return an empty ...

2020-03-22 14:55:04 359

原创 1390. Four Divisors (M)

Four Divisors (M)Given an integer array nums, return the sum of divisors of the integers in that array that have exactly four divisors.If there is no such integer in the array, return 0.Example 1:...

2020-03-22 14:12:47 201

原创 1389. Create Target Array in the Given Order (E)

Create Target Array in the Given Order (E)Given two arrays of integers nums and index. Your task is to create target array under the following rules:Initially target array is empty.From left to ri...

2020-03-22 13:49:19 524

原创 1383. Maximum Performance of a Team (H)

Maximum Performance of a Team (H)There are n engineers numbered from 1 to n and two arrays: speed and efficiency, where speed[i] and efficiency[i] represent the speed and efficiency for the i-th engi...

2020-03-16 03:38:22 381

原创 1381. Design a Stack With Increment Operation (M)

Design a Stack With Increment Operation (M)Design a stack which supports the following operations.Implement the CustomStack class:CustomStack(int maxSize) Initializes the object with maxSize which...

2020-03-15 13:22:30 360

原创 1382. Balance a Binary Search Tree (M)

Balance a Binary Search Tree (M)Given a binary search tree, return a balanced binary search tree with the same node values.A binary search tree is balanced if and only if the depth of the two subtre...

2020-03-15 12:50:56 313

原创 1380. Lucky Numbers in a Matrix (E)

Lucky Numbers in a Matrix (E)Given a m * n matrix of distinct numbers, return all lucky numbers in the matrix in any order.A lucky number is an element of the matrix such that it is the minimum elem...

2020-03-15 12:32:21 486

原创 260. Single Number III (M)

Single Number III (M)Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once.Examp...

2020-03-14 15:25:29 75

原创 319. Bulb Switcher (M)

Bulb Switcher (M)There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every third bulb (turning on if it’s o...

2020-03-14 13:07:29 95

原创 56. Merge Intervals (M)

Merge Intervals (M)Given a collection of intervals, merge all overlapping intervals.Example 1:Input: [[1,3],[2,6],[8,10],[15,18]]Output: [[1,6],[8,10],[15,18]]Explanation: Since intervals [1,3] a...

2020-03-12 15:06:30 135

原创 93. Restore IP Addresses (M)

Restore IP Addresses (M)Given a string containing only digits, restore it by returning all possible valid IP address combinations.Example:Input: "25525511135"Output: ["255.255.11.135", "255.255.11...

2020-03-11 05:16:03 80

原创 1377. Frog Position After T Seconds (H)

Frog Position After T Seconds (H)Given an undirected tree consisting of n vertices numbered from 1 to n. A frog starts jumping from the vertex 1. In one second, the frog jumps from its current vertex...

2020-03-09 06:15:34 276

原创 1376. Time Needed to Inform All Employees (M)

Time Needed to Inform All Employees (M)A company has n employees with a unique ID for each employee from 0 to n - 1. The head of the company has is the one with headID.Each employee has one direct m...

2020-03-09 03:54:52 277

原创 1375. Bulb Switcher III (M)

Bulb Switcher III (M)There is a room with n bulbs, numbered from 1 to n, arranged in a row from left to right. Initially, all the bulbs are turned off.At moment k (for k from 0 to n - 1), we turn on...

2020-03-09 03:24:21 448 1

原创 1374. Generate a String With Characters That Have Odd Counts (E)

Generate a String With Characters That Have Odd Counts (E)Given an integer n, return a string with n characters such that each character in such string occurs an odd number of times.The returned str...

2020-03-08 14:13:04 246

原创 140. Word Break II (H)

Word Break II (H)Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentence where each word is a valid dictionary word. Return ...

2020-03-07 14:22:41 112

原创 146. LRU Cache (M)

LRU Cache (M)Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put.get(key) - Get the value (will always be positive) of ...

2020-03-06 16:18:09 122

原创 139. Word Break (M)

Word Break (M)Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more dictionary word...

2020-03-04 07:48:24 123

原创 173. Binary Search Tree Iterator (M)

Binary Search Tree Iterator (M)Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling next() will return the next smallest numbe...

2020-03-04 04:02:59 132

原创 264. Ugly Number II (M)

Ugly Number II (M)Write a program to find the n-th ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5.Example:Input: n = 10Output: 12Explanation: 1, 2, 3, 4, ...

2020-03-03 04:52:06 110

原创 263. Ugly Number (E)

Ugly Number (E)Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5.Example 1:Input: 6Output: trueExplanat...

2020-03-03 02:59:42 102

原创 572. Subtree of Another Tree (E)

Subtree of Another Tree (E)Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a tree consists of a no...

2020-03-02 05:04:26 109

原创 1367. Linked List in Binary Tree (M)

Linked List in Binary Tree (M)Given a binary tree root and a linked list with head as the first node.Return True if all the elements in the linked list starting from the head correspond to some down...

2020-03-02 03:57:55 360

原创 1366. Rank Teams by Votes (M)

Rank Teams by Votes (M)In a special ranking system, each voter gives a rank from highest to lowest to all teams participated in the competition.The ordering of teams is decided by who received the m...

2020-03-01 14:36:24 488

原创 1365. How Many Numbers Are Smaller Than the Current Number (E)

How Many Numbers Are Smaller Than the Current Number (E)Given the array nums, for each nums[i] find out how many numbers in the array are smaller than it. That is, for each nums[i] you have to count ...

2020-03-01 13:25:58 702

原创 300. Longest Increasing Subsequence (M)

Longest Increasing Subsequence (M)Given an unsorted array of integers, find the length of longest increasing subsequence.Example:Input: [10,9,2,5,3,7,101,18]Output: 4 Explanation: The longest inc...

2020-02-26 08:06:12 87

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除