自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Made in Code

Everything is Math, everything is Code!

  • 博客(2087)
  • 问答 (1)
  • 收藏
  • 关注

原创 LeetCode //C - 730. Count Different Palindromic Subsequences

Problem: Count distinct palindromic subsequences in string with only 'a','b','c','d' charactersCore Idea: Use DP where dp[i][j][c] = count of palindromes in range [i,j] starting/ending with character cKey Insight: For palindromes starting/ending with sam

2025-05-28 07:15:00 587

原创 LeetCode //C - 729. My Calendar I

This article introduces a C language implementation for managing calendar events. The main function is to add new events and ensure that double bookings with overlapping times do not occur. The core of the implementation is to use a linked list to store al

2025-05-27 07:15:00 460

原创 LeetCode //C - 728. Self Dividing Numbers

Self-dividing numbers are numbers divisible by every digit they contain, excluding those with the digit zero. Given a range [left, right], the task is to identify all such numbers within this range. The solution involves iterating through each number in th

2025-05-26 07:15:00 913

原创 LeetCode //C - 726. Number of Atoms

This problem requires parsing a chemical formula and calculating the number of each atom. The chemical formula may contain nested parentheses and multiplicities represented by numbers. The solution is to use a stack to handle nested structures, storing the

2025-05-25 07:15:00 731

原创 LeetCode //C - 725. Split Linked List in Parts

The problem requires splitting a singly linked list into k consecutive parts with lengths as equal as possible. The solution involves first counting the total number of nodes in the list. Then, the base size for each part is calculated by dividing the tota

2025-05-24 07:15:00 997

原创 LeetCode //C - 722. Remove Comments

The question requires removing comments from C++ source code, including line comments ("//") and block comments ("/* ... */"). The solution is to traverse each line of code, use the flag inBlock to determine whether it is in a block comment, and use the bu

2025-05-23 07:15:00 675

原创 LeetCode //C - 721. Accounts Merge

Summary:The problem involves merging accounts based on shared emails. Each account contains a name and a list of emails. If two accounts share at least one email, they belong to the same person. The goal is to merge these accounts and return them in a spe

2025-05-22 07:15:00 943

原创 LeetCode //C - 720. Longest Word in Dictionary

Given a string array words, representing an English dictionary, you are required to return the longest word that can be built up step by step through other words. If there are multiple words that meet the criteria, return the one with the smallest lexicogr

2025-05-21 07:15:00 502

原创 LeetCode //C - 719. Find K-th Smallest Pair Distance

This problem requires finding the kth smallest pair distance in an array. First, sort the array to simplify distance calculations. Then use binary search to find the target distance between the minimum distance 0 and the maximum distance (the last element

2025-05-20 07:15:00 612

原创 LeetCode //C - 718. Maximum Length of Repeated Subarray

The problem requires finding the maximum length of a subarray that appears in both given integer arrays, nums1 and nums2. A dynamic programming approach is used to solve this efficiently. A 2D DP table is constructed where dp[i][j] represents the length of

2025-05-19 07:15:00 377

原创 LeetCode //C - 717. 1-bit and 2-bit Characters

This problem requires determining whether a given binary array ends with a single character (0). By traversing the array, when encountering 1, skip the next bit, because 1 always represents two characters (10 or 11); when encountering 0, only move one bit

2025-05-18 07:15:00 1161

原创 LeetCode //C - 715. Range Module

Range Module is a data structure for tracking numeric ranges, supporting add, query, and delete operations for half-open intervals [left, right). The core idea of ​​the implementation is to manage intervals through a dynamic array and merge or split interv

2025-05-17 07:15:00 1962

原创 LeetCode //C - 713. Subarray Product Less Than K

The question requires calculating the number of all consecutive subarrays in the array whose product is strictly less than a given integer k. If k is less than or equal to 1, return 0 directly, because no positive product will be less than 1. Use the slidi

2025-05-16 07:15:00 634

原创 LeetCode //C - 712. Minimum ASCII Delete Sum for Two Strings

To express something in English, ensure that the language used is clear, concise, and follows standard grammatical rules. Here are some tips to help improve English communication:Practice regularly by reading, writing, speaking, and listening to English c

2025-05-15 07:15:00 1401

原创 LeetCode //C - 710. Random Pick with Blacklist

【代码】LeetCode //C - 710. Random Pick with Blacklist。

2025-05-14 07:15:00 2107

原创 LeetCode //C - 709. To Lower Case

【代码】LeetCode //C - 709. To Lower Case。

2025-05-13 07:15:00 398

原创 LeetCode //C - 695. Max Area of Island

【代码】LeetCode //C - 695. Max Area of Island。

2025-05-12 07:15:00 563

原创 LeetCode //C - 707. Design Linked List

【代码】LeetCode //C - 707. Design Linked List。

2025-05-11 07:15:00 878

原创 LeetCode //C - 706. Design HashMap

【代码】LeetCode //C - 706. Design HashMap。

2025-05-10 07:15:00 1092

原创 LeetCode //C - 705. Design HashSet

【代码】LeetCode //C - 705. Design HashSet。

2025-05-09 07:15:00 1375

原创 LeetCode //C - 703. Kth Largest Element in a Stream

【代码】LeetCode //C - 703. Kth Largest Element in a Stream。

2025-05-08 07:15:00 537

原创 LeetCode //C - 701. Insert into a Binary Search Tree

【代码】LeetCode //C - 701. Insert into a Binary Search Tree。

2025-05-07 07:15:00 925

原创 LeetCode //C - 699. Falling Squares

【代码】LeetCode //C - 699. Falling Squares。

2025-05-06 07:15:00 1692

原创 LeetCode //C - 698. Partition to K Equal Sum Subsets

【代码】LeetCode //C - 698. Partition to K Equal Sum Subsets。

2025-05-05 07:15:00 1295

原创 LeetCode //C - 697. Degree of an Array

【代码】LeetCode //C - 697. Degree of an Array。

2025-05-04 07:15:00 826

原创 LeetCode //C - 696. Count Binary Substrings

【代码】LeetCode //C - 696. Count Binary Substrings。

2025-05-03 07:15:00 593

原创 LeetCode //C - 695. Max Area of Island

【代码】LeetCode //C - 695. Max Area of Island。

2025-05-02 07:15:00 981

原创 LeetCode //C - 693. Binary Number with Alternating Bits

【代码】LeetCode //C - 693. Binary Number with Alternating Bits。

2025-05-01 07:15:00 613

原创 LeetCode //C - 692. Top K Frequent Words

【代码】LeetCode //C - 692. Top K Frequent Words。

2025-04-30 07:15:00 846

原创 LeetCode //C - 691. Stickers to Spell Word

【代码】LeetCode //C - 691. Stickers to Spell Word。

2025-04-29 07:15:00 847

原创 LeetCode //C++ - 690. Employee Importance

【代码】LeetCode //C++ - 690. Employee Importance。

2025-04-28 07:15:00 662

原创 LeetCode //C - 689. Maximum Sum of 3 Non-Overlapping Subarrays

【代码】LeetCode //C - 689. Maximum Sum of 3 Non-Overlapping Subarrays。

2025-04-27 07:15:00 525

原创 LeetCode //C - 688. Knight Probability in Chessboard

【代码】LeetCode //C - 688. Knight Probability in Chessboard。

2025-04-26 07:15:00 1834

原创 LeetCode //C - 687. Longest Univalue Path

【代码】LeetCode //C - 687. Longest Univalue Path。

2025-04-25 07:15:00 571

原创 LeetCode //C - 686. Repeated String Match

【代码】LeetCode //C - 686. Repeated String Match。

2025-04-24 07:15:00 672

原创 LeetCode //C - 685. Redundant Connection II

【代码】LeetCode //C - 685. Redundant Connection II。

2025-04-23 07:15:00 1066

原创 LeetCode //C - 684. Redundant Connection

【代码】LeetCode //C - 684. Redundant Connection。

2025-04-22 07:15:00 1181

原创 LeetCode //C - 682. Baseball Game

【代码】LeetCode //C - 682. Baseball Game。

2025-04-21 07:15:00 852

原创 LeetCode //C - 680. Valid Palindrome II

【代码】LeetCode //C - 680. Valid Palindrome II。

2025-04-20 07:15:00 1387

原创 LeetCode //C - 679. 24 Game

【代码】LeetCode //C - 679. 24 Game。

2025-04-19 07:15:00 982

空空如也

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

TA关注的人

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