07 2021 档案

摘要:1. 题目 1.1 英文题目 Given a string s, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. 1.2 中文题目 给定一个字符串,验证它是否是 阅读全文
posted @ 2021-07-31 19:15 云梦士 阅读(64) 评论(0) 推荐(0)
摘要:1. 题目 1.1 英文题目 Given two binary strings a and b, return their sum as a binary string. 1.2 中文题目 给定两个二进制字符串,返回他们的和(用二进制表示)。输入为非空字符串且只包含数字 1 和 0。 1.3输入输出 阅读全文
posted @ 2021-07-31 08:30 云梦士 阅读(121) 评论(0) 推荐(0)
摘要:1. 题目 1.1 英文题目 Given a string s consists of some words separated by spaces, return the length of the last word in the string. If the last word does no 阅读全文
posted @ 2021-07-28 11:16 云梦士 阅读(96) 评论(0) 推荐(0)
摘要:1. 题目 1.1 英文题目 Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Clarificat 阅读全文
posted @ 2021-07-26 09:32 云梦士 阅读(72) 评论(0) 推荐(0)
摘要:1. 题目 1.1 英文题目 Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input strin 阅读全文
posted @ 2021-07-21 20:52 云梦士 阅读(150) 评论(0) 推荐(0)
摘要:1. 题目 1.1 英文题目 Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty st 阅读全文
posted @ 2021-07-21 16:12 云梦士 阅读(155) 评论(0) 推荐(0)
摘要:1. 题目 1.1 英文题目 Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. | Symbol | Value | | | | | I | 1 | | V | 5 | | X | 1 阅读全文
posted @ 2021-07-20 08:50 云梦士 阅读(293) 评论(0) 推荐(0)
摘要:1. 定义: 向量(Vector)是一个封装了动态大小数组的顺序容器(Sequence Container)可以认为是一个动态数组,其中一个vector中的所有对象都必须是同一种类型的。 #2. 构造函数: 2.1 一般情况 vector vecName(); // 构造一个空vector,其中包含 阅读全文
posted @ 2021-07-19 15:33 云梦士 阅读(6816) 评论(3) 推荐(2)
摘要:1. 题目 1.1 英文题目 Given an array nums of size n, return the majority element. The majority element is the element that appears more than ⌊n / 2⌋ times. Y 阅读全文
posted @ 2021-07-14 20:49 云梦士 阅读(151) 评论(0) 推荐(0)
摘要:1. 问题引入 通过查看[https://www.cplusplus.com/reference/vector/vector/] 的vector.size()说明,即 | member type | definition | notes | | | | | | size_type| an unsig 阅读全文
posted @ 2021-07-14 09:54 云梦士 阅读(4927) 评论(0) 推荐(2)
摘要:1. 题目 1.1 英文题目 Given an array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific 阅读全文
posted @ 2021-07-12 09:39 云梦士 阅读(107) 评论(0) 推荐(0)
摘要:1. 题目 1.1 英文题目 Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. You must implement a soluti 阅读全文
posted @ 2021-07-10 16:12 云梦士 阅读(117) 评论(0) 推荐(0)
摘要:1. 题目 1.1 英文题目 You are given an array prices where prices[i] is the price of a given stock on the ith day. Find the maximum profit you can achieve. Yo 阅读全文
posted @ 2021-07-10 10:30 云梦士 阅读(117) 评论(0) 推荐(0)
摘要:1. 题目 1.1 英文题目 You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosin 阅读全文
posted @ 2021-07-07 10:21 云梦士 阅读(163) 评论(0) 推荐(0)
摘要:1. 题目 1.1 英文题目 Given an integer rowIndex, return the rowIndexth (0-indexed) row of the Pascal's triangle. In Pascal's triangle, each number is the sum 阅读全文
posted @ 2021-07-06 18:20 云梦士 阅读(130) 评论(0) 推荐(0)
摘要:1. 题目 1.1 英文题目 Given an integer array nums where the elements are sorted in ascending order, convert it to a height-balanced binary search tree. A hei 阅读全文
posted @ 2021-07-06 15:53 云梦士 阅读(133) 评论(0) 推荐(0)