Tag:length

  • Sequential representation of linear table — sequential table

    Time:2021-7-31

    1. Definition of sequence table The sequential table uses a group of storage units with continuous addresses to store the data elements in the linear table in turn. Logically adjacent elements are stored in storage units that are also adjacent in physical locations, and the relationship between elements is reflected by the adjacency relationship of […]

  • What is a rotating array? Text + code analysis

    Time:2021-7-28

    The original is from WeChat official account: Jing Yu.   The rotation array is divided into left rotation and right rotation. The force buckle 189 is entitled right rotation, and today’s share is left rotation. Given an array, rotate the elements in the array to the leftkLocations, wherekIs a nonnegative number. Figure 0-1 array arr […]

  • SPL data structure 3-splfixedarray

    Time:2021-7-27

    Splfixedarray is a fixed length array provided in PHP. The array in PHP language is particularly powerful. It can realize data structures such as stack, queue, list, dictionary and so on. Its bottom layer is based on hash table. The array represented by splfixedarray is close to the array in C go and other languages. […]

  • The data structure contains variable length field processing

    Time:2021-7-26

    1、 Foreword In the actual system, the process for the user to know what happened may be: the underlying driver detects the event – throws it up to the corresponding module for processing – pop up or other ways to make it visible to the user. However, there are many kinds of events. Sometimes the […]

  • Open source a new snowflake algorithm

    Time:2021-7-26

    The content has expired. Please check the latest content: https://www.cnblogs.com/yitter/p/14610169.html ID generation algorithm better than snowflake algorithm (single machine or distributed unique ID) Algorithm Introduction ❄A new snowflake drift algorithm, the generated ID is shorter and faster. ❄The core is to shorten the ID length and have extremely high instantaneous concurrent processing capacity (conservative value […]

  • [Java from entering the pit to giving up] No 6. Tricks of array operation

    Time:2021-7-26

    preface We have talked about the eight basic data types in Java. This article mainly talks about arrays in reference types. The main contents are as follows: Array introduction ergodic sort common method Array introduction An array is actually a collection of elements of the same data type arranged in a certain order. That is, […]

  • [activities that babies can understand] [30 day leetcoding challenge] day 11

    Time:2021-7-25

    Diameter of binary tree Hi, everyone, I’m Zhang Xiaozhu. Welcome to the special article of the “baby can understand” series – the official activity “30 day leetcoding challenge”. Here is the question of April 11 and the 543rd question in the list – “diameter of binary tree” Title Description Given a binary tree, you need […]

  • MySQL official documents learn char and varchar of data types

    Time:2021-7-24

    Char and varchar types are similar, but they are also different in storage and retrieval, and they are also different in maximum length and whether to keep spaces at the end. The length of char is defined by yourself when you create the table. The range of length is 0-255. When the char value is […]

  • Metaphysics of array, slice and append in go

    Time:2021-7-22

    func main() { Arr: = make ([] int, 0, 9) // length 0, capacity 9 FMT. Printf (“address 0: P% n”, ARR) // address unchanged FMT. Printf (“len: D, cap: D, data:% + V / N”, len (ARR), cap (ARR), ARR) // length 0 Arr = append (arr, 1, 2, 3) // the address remains […]

  • String length limit

    Time:2021-7-19

    Is there a limit to the length of string? How much is it? In Java, string is limited in length, and there are specifications in JVM compilation.String actually uses an array of char type to store the characters in the string. public final class String implements java.io.Serializable, Comparable<String>, CharSequence, Constable, ConstantDesc { @Stable private final […]

  • Talking about int (1) in MySQL

    Time:2021-7-17

    A reader asked me such a question yesterdayWhen creating a table in mysql, I set a field as int type with a length of 1, but I found that this field can store numbers of any length. What’s the situation? This problem was also encountered when I first contacted the database. I think it is […]

  • String, StringBuffer, StringBuilder of Java string

    Time:2021-7-14

    String, StringBuffer, StringBuilder of Java string 1: ComparisonExecution speed: stingbuilder > StringBuffer > stringString string constantStringBuffer string variable (thread safe)StringBuilder string variables (thread is not safe) implement charsequence interface to represent ordered character setThe charsequence interface has several methods:1. Get the character of the specified index: public char charat (int index)2. Get string length: public […]