[daily question] game 279 weekly question - weekly game is still interesting
⭐ New pit in winter vacation -- daily question notes of code Fox
⭐ Problem solving ideas
Save in groups by subscript parity and sort them separatelyGet each digit, sort, and process according to the positive and negative classification (negative numbers require the largest positive number after rearrangement, positive numbers require ...
Posted by evanesq on Sun, 06 Feb 2022 20:43:19 +0100
Code Capriccio record: binary tree (Part II)
236. Nearest common ancestor of binary tree
Title Description: Train of thought analysis: Anyway, I'm still confused about recursion... More practice can only be. The thought of boss Carl can still be understood. It's really unexpected when he did it himself. The code is as follows:
/**
* Definition for a binary tree node.
* public class ...
Posted by plouka on Sun, 06 Feb 2022 19:21:09 +0100
Solutions to the 7th Blue Bridge Cup Java group B questions
A. Number of briquettes
Title Description
This question is a blank filling question. You only need to calculate the result and use the output statement in the code to output the filled result.
There is a pile of coal balls, piled into a triangular pyramid. Specifically: 1 on the first floor, 3 on the second floor (arranged in a triangle), 6 ...
Posted by seenu_vas80 on Sun, 06 Feb 2022 08:37:18 +0100
[LeetCode 108 binary search tree] convert the ordered array into a binary search tree
1. Title
Give you an integer array nums, in which the elements have been arranged in ascending order. Please convert it into a highly balanced binary search tree.
A height balanced binary tree is a tree that satisfies the requirement that the absolute value of the height difference between the left and right subtrees of each node does ...
Posted by alecapone on Sat, 05 Feb 2022 13:06:54 +0100
LeetCode C++ 1881. Maximum Value after Insertion
You are given a very large integer n, represented as a string, and an integer digit x. The digits in n and the digit x are in the inclusive range [1, 9], and n may represent a negative number.
You want to maximize n's numerical value by inserting x anywhere in the decimal representation of n. You cannot insert x to the left of the ...
Posted by curioadmin on Sat, 05 Feb 2022 11:34:33 +0100
leetcode daily question 1219 Gold miner DFS deep search violence AC on the fifth day of the first month, I wish you a wide range of money~
📖 Content of this article: leetcode daily question 1219 Gold miner DFS deep search violence AC on the fifth day of the first month, I wish you a wide range of money~ 📑 Article column: leetcode daily question "punch in daily" 📆 Last updated: February 4, 2022 leetcode daily question 1725 The number of rectangles that can form th ...
Posted by NeoGeo on Sat, 05 Feb 2022 09:37:45 +0100
Leetcode algorithm interview sprint actual combat 12 (stack)
978 · basic calculator
Implement a basic calculator to calculate a simple expression.
The expression string may contain left parenthesis' ('and right parenthesis'), plus sign' + 'or minus sign' - ', non negative integer and space'.
The expression given is always reasonable. Learned the usage of eval. An error was encountered: E ...
Posted by w00kie on Fri, 04 Feb 2022 12:25:21 +0100
[JAVA programming] letter combination of telephone number
1, Title Description
Given a string containing only numbers 2-9, returns all the letter combinations it can represent. The answers can be returned in any order. The mapping of numbers to letters is given as follows (the same as telephone keys). Note that 1 does not correspond to any letter.
Example 1: Input: digits = "23" Output: [ ...
Posted by closer on Fri, 04 Feb 2022 04:22:01 +0100
Day12-Recursive+Tree
Title Source: LeetCode
LeetCode Month Emblem Title of the Day
1414. and the minimum number of Fibonacci numbers for K
Give you the number k, and return the smallest number of Fibonacci numbers for k, where each Fibonacci number can be used multiple times.
The Fibonacci number is defined as:
F1 = 1 F2 = 1 Fn = Fn-1 + Fn-2, where n > 2. T ...
Posted by jcarver on Thu, 03 Feb 2022 21:04:43 +0100
Sword finger Offer 67 Convert string to integer
Title Description:
Write a function StrToInt to realize the function of converting string into integer. atoi or other similar library functions cannot be used.
First, the function discards useless opening space characters as needed until the first non space character is found.
When the first non empty character we find is a positive ...
Posted by supermars on Thu, 03 Feb 2022 20:23:54 +0100