Tag:data structure

  • SPL data structure 1-bidirectional linked list, stack, queue


    In PHP, the SPL extension provides some common data structures for us to use. Only because there is a universal array in PHP, there will be less understanding of data structures and the use of related data structures. Some data structures and usage instructions provided in SPL are sorted out below, so that we can […]

  • ES6 Usage Summary


    Destructuring assignment Realize variable exchange let a =1; let b=2 [a,b]=[b,a] console.log(a,b)//2,1 Default value assignment [a,b,c=3]=[1,2] console.log(a,b,c)//1,2,3 Get function return value directly function fc(){ return [1,2] } let a,b; [a,b]=fc() console.log(a,b)//1,2 Nested deconstruction assignment of objects let metadata={ title:’currentTitle’, test:[{ title:”deepTitle”, desc:’description’ }] } let {title:titleone,test:[{title:titlescond}]}=metadata; console.log(titleone,titlescond)//currentTitle,deepTitle String extension If the Unicode code is greater […]

  • SPL data structure 2-heap, maximum heap, minimum heap


    Heap is a common data structure. The bottom layer is a binary tree implemented by array. But there are no parent and child pointers. Sort according to heap properties. It is divided into minimum heap and maximum heap. Minimum heap: the value of the parent node is smaller than that of each child node Maximum […]

  • SPL data structure 3-splfixedarray


    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. […]

  • Why do they say C + + is too complex? Abstractionists are anti-human design!


    To measure whether a language (in a broad sense, not only programming language) is complex, we can look at the number of words, part of speech changes and grammatical structure. eight According to relevant data, up to the latest C + + 20, there are about 99 keywords in C + + and 6 names […]

  • Redis cache and related instructions


    Redis cache System optimization strategy: Role: the introduction of caching mechanism can effectively reduce the frequency of user access to physical devices, so as to improve the response speed How to design cache 1) How to store cache data? What kind of data structure should be used? Uniqueness of K-V key2) The capacity of cache […]

  • Illustrated elasticsearch search principle! You’ll see


    First top-down, then bottom-up introductionElasticSearchIt tries to answer the following questions Why my search*foo-bar*Can’t matchfoo-bar ? Why do more files compress the index? Why does elasticsearch take up a lot of memory? edition Elasticsearch version: elasticsearch-2.2.0 Clusters on the cloud Box in cluster Each white square box in the cloud represents a node node. Between […]

  • Redis cache server


    website: http://www.redis.cn/Advance preparation: virtual machine Introduction to redis Redis is an open source (BSD license), in memory data structure storage system, which can be used as database, cache, message middleware. It supports multiple types of data structures, such as strings, hashes, lists, sets, sorted sets and range queries, bitmaps, hyperlogs and geospatial index radius queries. […]

  • Acquisition and processing of Chinese Wikipedia


    1、 Get http://dumps.wikimedia.org/     Enwiki (English) zhwiki (Chinese) Guidance document: https://www.cs.bgu.ac.il/~elhadad/nlp12/jwpl/wikification.html 2、 Treatment reference resources: https://dkpro.github.io/dkpro-jwpl/HowToGetJWPL/ CMD problem is not easy to solve (mainly can’t read, can’t change) chose eclipse Configuration issues include: JDK environment settings (system and eclipse) VM environment settings (ECLIPS. INI) https://dkpro.github.io/dkpro-jwpl/DeveloperSetup/ Data structure settings (file location)   Read the official documents carefully […]

  • Front end interview daily 3 + 1 (Zhou Huizong 2020.01.05)


    In the Analects of Confucius, Zeng Zi said:“I think twice every day”I reflect on myself many times a day.Front end interview daily 3 + 1 questions, to interview questions to drive learning, a little progress every day!Let efforts become a habit, let struggle become an enjoyment!believeinsistThe power of the world ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!!! Learning doesn’t close, charging […]

  • [algorithm] – live series of Ditai Software Institute


    Single element search describe Except for one element, the other elements in the integer array are repeated N times. To find out the single element, it is necessary to ensure that the time complexity is within o (n). Consider the case of n = 2, n = 3;Consider the case that except one element appears […]

  • Consolidate JS Foundation (update slowly)


    Consolidate JS Foundation Functional correlation Precompile / scope / closure Prototype / prototype chain / inheritance Operation method of array / object DOM object related The use of oninput //An attribute that monitors whether an element is in the input state //It’s not just for HTML elements with input Object. Oninput = function (myscript) // […]