[diary of dishes] 215 The kth largest element in the array

Series index: [diary of dishes] the days when LeetCode used Python to abuse The road of cultivating immortality with vegetables and chickens -- January 17, 2022 Although I haven't written a topic solution blog these two days, I still haven't broken one day. I just write simple questions and sometimes I don't think it's necessary to write ...

Posted by krang on Tue, 18 Jan 2022 23:24:07 +0100

[golang] leetcode primary - rotating array & duplicate elements exist

Question 1 rotate arrayTopic informationGive you an array, rotate the elements in the array to the right K , positions, where k , is a non negative number. Example 1:Input: nums = [1,2,3,4,5,6,7], k = 3Output: [5,6,7,1,2,3,4]Explanation:Turn right for one step: [7,1,2,3,4,5,6]Turn right for 2 steps: [6,7,1,2,3,4,5]Rotate right for 3 steps: [5 ...

Posted by noiseusse on Mon, 17 Jan 2022 17:55:09 +0100

LeetCode 55.45. Jumping game I & II (greed)

Title Link: 55. Jumping game I Title details: Given a nonnegative integer array of , nums, you are initially at the , first subscript of the array. Each element in the array represents the maximum length you can jump at that position. Judge whether you can reach the last subscript. Example 1: Input: num = [2,3,1,1,4] Output: tru ...

Posted by shinyjoy on Mon, 17 Jan 2022 17:14:27 +0100

C brush question: LeetCode 752 Open the turntable lock (medium) | BFS wide search detailed explanation

Next blog: C brush question: LeetCode 752 Open the turntable lock (medium) | BFS wide search detailed explanation (1) Hash version Add HASH data structure, be familiar with the use of uthash, and add constraints. Main constraints: Do not turn back, for example, if you turn forward once, you are not allowed to turn backCan't cross dean ...

Posted by Christian B. on Mon, 17 Jan 2022 15:17:37 +0100

Force button brush question frame

This paper mainly summarizes the common points of dynamic programming problems in force buckle, obtains a general solution and algorithm framework, and solves more problems according to this scheme and framework. It's also labuladong's algorithm note taking Original link: https://labuladong.gitee.io/algo/ Question form: find the maximum va ...

Posted by etherboo on Mon, 17 Jan 2022 09:28:07 +0100

[link list of Leetcode notes] 234 Palindrome linked list

😈 Blog home page: 🐼 Hello, everyone. My name is classmate Zhang🐼 💖 Welcome to praise 👍 Collection 💗 Leaving a message. 📝 Welcome to discuss! 👀 🎵 This article was originally written by [Hello, my name is classmate Zhang] and started at CSDN 🌟🌟🌟 ✨ Boutique column (updated from time to time) [data structure + algorithm] [notes][C l ...

Posted by digi24 on Sun, 16 Jan 2022 22:26:08 +0100

Easy questions related to LeetCode binary tree --- binary tree

Question 1: merging binary trees LeetCode 617 : Merge binary tree Description: Given two binary trees, imagine that when you overlay one of them on the other, some nodes of the two binary trees will overlap. You need to merge them into a new binary tree. The merging rule is that if two nodes overlap, their values are added as the new value ...

Posted by iamtheironman on Sun, 16 Jan 2022 19:47:10 +0100

LeetCode 04 question - find the median of two positive arrays

LeetCode 04 question - > find the median of two positive arrays 1. Title Description Find the median of two positively ordered arrays Give two positively ordered (from small to large) arrays nums1 and nums2 of sizes m and N, respectively. Please find and return the median of these two positive arrays. The time complexity of the algorithm ...

Posted by alasxdair on Sun, 16 Jan 2022 12:34:47 +0100

[LeetCode] determine a binary tree

preface This paper shows the topics related to determining a binary tree in LeetCode, which readers can use to write by dictation to check whether they are familiar with the relevant algorithms. The difficulty is medium. LeetCode topic Related topic types Related links 105 Constructing binary tree from preorder and inorder traversal sequ ...

Posted by mazman on Sun, 16 Jan 2022 05:50:18 +0100

Detailed solution to bit operation - 2018 CCPC Guilin station: D. Bits Reverse

Bit operation problem solution   Question source: 2018 CCPC Guilin station: D. Bits Reverse   Title Description     Topic meaning understanding input T T T groups of data, each group of data contains two integers ...

Posted by daria on Sat, 15 Jan 2022 16:01:04 +0100