The dictionary instance of C# in the statistical sorting application

问题: gives a string, the string is 26 English uppercase letters, it is required to count the number of occurrences of each uppercase letter and sort. 解解: Here I want to create an int array with a value of 0, a char array with 26 letters, traverse the string first, and then a layer of for...


Python language basic six

14, file description is a document? Everything is under linux. Common file formats: .exe, .txt, .ppt, .jpg, .mp4, .avi... 1. How do I open a file and get a file descriptor? It is usually opened in the form of f = open (file path, open mode). print(help(open)) Output: open(file, mode='r'...


JavaScript you don't know - the do expression and the eval()

ES7 specification have a "do expression" proposal, but the specific use cases and syntax are not widely used, so only mention here. , similar to the following: var a, b; a = do { if (true) { b = 4 + 38; } }; a; // 42 上上,do { .. } The expression executes a block of code (containing one...


[LeetCode] 127. Word Ladder

题 Given an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3]… Example 1: Input: nums = [1, 5, 1, 1, 6, 4] Output: One possible answer is [1, 4, 1, 5, 1, 6]. Example 2: Input: nums = [1, 3, 2, 2, 3, 1] Output: One possible answer is [2, 3, 1, 3, 1, ...


Python programming specification

一注: two meanings, two ways two ways: # 个人注 """ """ docstrings : Indicate how to use this package, module, class, function (method ), even including the use of examples and unit tests. It is recommended to write docstrings for each package, module, class, function (method). Example:...


Leetcode50:Pow(x, n)

Think: Do it directly with the loop, it will prompt timeout. We can use half-calculation by recursion, and reduce n by half each time, so that n will eventually shrink to 0, and the zeroth power of any number is 1. At this time, we will multiply again. If n is even at this time,...


Steps of website construction

Follow the development of the Internet. With the help of the Internet, there are more and more entrepreneurs. For example, the author recently signed a popular name for selling pork, but after improvement and packaging, it has become ham, especially Young people love it. The customer...


LeetCode 415. Add Strings (string addition) python3 version

码 reproduced from: Click here to view I added a very detailed annotation to 很详细的注解 , which seems to be much more convenient, especially @class Solution(object): Def addStrings(self, num1, num2): """ :type num1: str :type num2: str :rtype: str """ #length minus one is the last position...


Java Stack - Array Implementation The

stack also has two basic storage structures: a sequential storage structure and a chained storage structure. Below we will use arrays to implement the sequential storage structure of the stack. When there is no data element in the stack, it is called empty stack; inserting an element...


Java interview daily ten questions (two)

11, switch can be applied to the byte, can it be applied to the long, can it be applied to the String? 答:switch can be applied to icsb(i see sb), ie int, char, short, byte and their wrapper class; can't be applied to fdlb (float), ie float, Double, long, boolean and their wrapper class;...


The class copy efficiency test

is now a WCF+EF project. It was originally used to directly use the EF class for WCF. Now need to be separated, so that the WCF class and the EF class evolve independently, because the front-end and back-end personnel are different, the class design habits are different; and sometimes...


Listening for changes in storage in vue

Why should I listen for changes in storage? When we are using vue, sometimes we need two data to share globally. Although vue provides the vuex module to solve this problem, it is not easy to introduce vuex for the sharing of one or two data, so we choose Use storage to save shared data...


Talk about the understanding of Restful

1.Restful? REST is English representational state transfer or representational state transfer; Rest is an architectural style of web services; uses widely popular standards and protocols such as HTTP, URI, XML, JSON, HTML; Quantitative, cross-platform, cross-language architecture design...


It is said that most of the black and white red passengers are from the testing industry, so how to do the foreplay? Poke down

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The method of ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fiddler can't catch the package? I have checked the information for a few days or can't catch the package? what reason? Then, let me tell...


jQuery

$(document).ready() and Window.onload difference 1. Execution time Window.onload must wait until all elements of the page, including the image, have been loaded before they can be executed. $(document).ready() is executed after the DOM structure is drawn, and does not have to wait until...


Breadth-first search

Breadth-first search is a search algorithm for graphs that helps answer two types of questions: 1. From node A, is there a path to node B? 2. Which path from node A to node B is the shortest? Search principle: If a friend is a one-time relationship, a friend of a friend is a second...


005 The longest palindrome substring

题 Given a string s, find the longest palindrome substring in s. You can assume that the maximum length of s is 1000. example 1: Enter: "babad" Output: "bab" Note: "aba" is also a valid answer. 样2: 输入: "cbbd" Output: "bb" 解解思想 暴解解 这思想是是 let result = "" ; for ( let i = 0 ; i < s ....


2.6.3 centos7 configure the system

Author: God Feijian Website: www.feijianshen.com E-mail: [email protected] I: Baidu Cloud: wrzfeijianshen This blog has a total of download blogs and links to the tools used in it: link: https://pan.baidu.com/s/18f7qXyK-gf1EoaEF5G8pcA Password: scux Courseware is here: https:/...


What is a class array

Class array is written in the same way as an array, such as argumens, the first parameter of the function is argument[0], which is written like an array, but not an array. His prototype is Object. function functionName() { console.log(arguments); } functionName(3, 5) Arguments(2) [3, 5,...


Vue uses styles and inline styles

Note: 1.Vue uses styles, must be bound with v-on (abbreviated to:) 2. In Js, objects (disordered The list of quotation marks for key-value pairs can be omitted, but other special characters such as hyphens in attribute names should be separated by quotation marks. It is recommended to...