C language to achieve high precision except high precision

Freshman and Xiaobai try high precision except high precision introduction The author is a freshman. In the process of doing questions, he came into contact with high-precision division. He wrote this blog to help clarify his ideas. I hope this blog can help more students who have just come into contact with C language. If there are mistakes ...

Posted by NathanLedet on Sun, 19 Dec 2021 05:07:13 +0100

Computer experiment of data structure (Chapter 6) - tree and binary tree III

1. The weighted path length (WPL) of a binary tree is the sum of the weighted path lengths of all leaf nodes in the binary tree. Given a binary tree T, it is stored in a binary linked list, and the node structure is The weight field of the leaf node stores the non negative weight of the node. Set root as the pointer to the root node of T. ty ...

Posted by texmansru47 on Sat, 18 Dec 2021 21:31:39 +0100

Data Structure - Trees and Binary Trees (Part III)

Data Structure - Trees and Binary Trees (Chapter VII). If there are any errors, please correct them. Constructing Binary Trees from Traversal Sequences Yes can can Of three ...

Posted by sara_kovai on Sat, 18 Dec 2021 18:55:54 +0100

c language simple string processing

Comprehensively practice the basic knowledge of string, function and pointer The key to this problem is the pointer, which can continuously process the source data. The title comes from my university teacher. If there is infringement, you can contact the author to delete it. If there is a simpler algorithm, you are also welcome to add qq fo ...

Posted by Tracekill on Sat, 18 Dec 2021 14:45:00 +0100

Sincere sum: learning tutorial of C++ STL iterator

C++ STL iterator One of the keys to understanding how to use C + + Standard Template Library (STL) containers is to understand how iterators work. Containers such as lists and maps don't behave like arrays, so you can't use a for loop to iterate over the elements. Similarly, because these containers cannot be accessed randomly, simple integer ...

Posted by Crave on Sat, 18 Dec 2021 03:56:08 +0100

Trap of variable length array in C language

Trap of variable length array in C language This article is a translation, Original link Compared with fixed length arrays, variable length arrays will generate additional code, making the code run slower and less robust~ Linus Torvalds Variable length array, abbreviated as VLA (variable length array), is an array whose length is determ ...

Posted by dhie on Fri, 17 Dec 2021 20:05:41 +0100

Numbers that appear more than half the times in the array (C language + Java)

More than half of the numbers appear in the array. This question comes from the sword finger Offer. A number in the array appears more than half the length of the array. Please find out this number. There are three solutions Idea 1: Because the number we are looking for is more than half of the length, we can sort the array, and then the numb ...

Posted by wiggly81 on Fri, 17 Dec 2021 20:03:21 +0100

[data structure and algorithm 11] Tencent T3 will teach you seven common sorting algorithms

Time complexity and space complexity of the algorithm: 2, Seven sorting algorithms (1) Bubble sorting 1. Basic thought Compare the two adjacent numbers in turn, and put the smaller number in the front and the larger number in the back. 2. Dynamic rendering 3. Code implementation //Bubble sorting private static void bubbleSort(int ...

Posted by chiprivers on Fri, 17 Dec 2021 18:40:53 +0100

Complete solution to the curriculum problem [implemented in pure C language]

The four questions here have different ideas: The first two are topological sorting. The concept of penetration is used to judge whether there are rings in the graph. Queue and stack are used respectively.When creating a graph, you can use dynamic capacity expansion to build a data structure similar to the adjacency tableThe third problem uses ...

Posted by cjconnor24 on Fri, 17 Dec 2021 07:50:18 +0100

Analysis of C language library functions -- qsort function (quick sort)

Article catalog prefaceI Bubble sortingII Limitations of bubble sorting3, Use and advantages of qsort function4, Implementation of qsort function by bubble sorting simulationsummary preface Sorting is often used in our daily programming, and bubble sorting is also our most common sorting method. Here we analyze bubble sorting and i ...

Posted by member123 on Fri, 17 Dec 2021 06:40:15 +0100