[backtracking algorithm] facebook interview question - bracket generation

catalogue Title Description Backtracking solution Title Description Title address: https://leetcode-cn.com/problems/generate-parentheses/ Given that n represents the logarithm of the generated parentheses, please write a function so that it can generate all possible and effective parenthesis combinations. For example, given n = 3, the gen ...

Posted by sundawg on Sat, 07 May 2022 22:48:58 +0300

[Backtracking interview questions] facebook interview questions - letter combinations of phone numbers (two solutions)

content Topic description Backtracking solution Solve using queues Topic description Title address: https://leetcode-cn.com/problems/letter-combinations-of-a-phone-number/ Given a string containing only the numbers 2-9, return all letter combinations it can represent. The mapping of numbers to letters is given as follows (same as phone k ...

Posted by johnpaine on Sat, 07 May 2022 10:12:49 +0300

Interview question brushing algorithm oj-3

Oj599: sum of two numbers 1 Title Description Given an array from small to large and a target number t, find two numbers in it, make the sum of the two numbers equal to the target number, and output the position of the two numbers in the array. input The first line contains two integers n,t. (1≤n≤1000000,1≤t≤20000000) The num ...

Posted by dearmoawiz on Wed, 04 May 2022 17:56:02 +0300

[leetcode Python] - binary search-81 Search in Rotated Sorted Array II

catalogue   Title Link Title Description Examples Solution I Solution I Python implementation Solution 2 Solution 2: Python code Related topics Link title 81. Search in Rotated Sorted Array II Title Description Search for a target in a rotated ordered array that may contain duplicate elements. If the target is found in the array, ...

Posted by AceOfJames on Tue, 03 May 2022 18:47:44 +0300

Niu Ke interview required real questions SQL chapter 72 full answers - advanced chapter

This article mainly contains the advanced part of the 72 questions in the SQL article, which is a must-tested question in the interview. It mainly includes the more difficult level (18 questions) and the difficult level (4 questions). The questions are more complicated, and my answer may not be the best solution. , Welcome everyone to correct m ...

Posted by glcarlstrom on Mon, 02 May 2022 21:55:06 +0300

Longest Palindromic Substring

Give you a string s, find the longest palindrome substring in S. Example 1: Input: s = "babad" Output:'bab' Explanation: "aba" is also the answer to the question. Example 2: Input: s = cbbd Output:'bb' Tips: 1 <= s.length <= 1000 s consists of numbers and letters only Author: LeetCode Links: https://leetcode-cn.c ...

Posted by alan007 on Mon, 02 May 2022 00:15:43 +0300

Leetcode question bank: application of dynamic programming in stone guessing game (Python language)

dynamic programming There are a lot of tutorials and concepts on the Internet. The premise of reading this article is that you have a preliminary understanding of dynamic planning. To sum up, dynamic planning has four steps: Define the status. Find the state transition equation State compression (if possible) Get results Stone guessing ga ...

Posted by xeross on Sun, 01 May 2022 15:41:16 +0300

Design the smallest stack, that is, there are the basic operations of the stack, push, pop, peek, and the function of returning the minimum value in the stack, getMin

Design the smallest stack, that is, there are the basic operations of the stack, push, pop, peek, and the function of returning the minimum value in the stack, getMin Tip: previously, we said that the system stack can push, pop and peek normally Now we need to design a minimum stack, and the o(1) speed returns the minimum value in the current ...

Posted by dragon_sa on Sun, 01 May 2022 01:52:25 +0300

Question 4 of 220 weekly matches of Li Kou: check whether the path of edge length limit exists and check the set + offline thinking

It mainly refers to the problem solutions of , zerotrac and , liuyubo—— "https://leetcode-cn.com/problems/checking-existence-of-edge-length-limited-paths/solution/jian-cha-bian-chang-du-xian-zhi-de-lu-ji-c756/" "https://leetcode-cn.com/problems/checking-existence-of-edge-length-limited-paths/solution/jie-zhe-ge-wen-ti-ke-pu-yi ...

Posted by asherinho on Sat, 30 Apr 2022 12:23:32 +0300

leetcode question brushing (c language version)

Linked list Adding two numbers (medium difficulty) Give two non empty linked lists to represent two non negative integers. Among them, their respective digits are stored in reverse order, and each node can only store one digit. If we add the two numbers together, we will return a new linked list to represent their sum. You can assume that ...

Posted by Timsoft on Fri, 29 Apr 2022 13:47:30 +0300