Greedy Algorithms-Maximum Problem: Greedy Method, Binary Sorting and Pointer

Question: Give a set of non-negative integers and rearrange them to form the largest integer. Example: Given [1, 20, 23, 4, 8], the integer with the largest return combination should be 8423201. Challenge: Time complexity: O(nlogn) Sources of the problem:   http://www.lintcode.com/zh-cn/problem/largest-number/   Train of thought: Two ideas: 1 ...

Posted by fiddler80 on Thu, 23 May 2019 15:48:40 -0700

In-depth V8 Engine-Time Module Introduction

Accumulate your steps and travel thousands of miles. Start with the simplest. This article introduces the time module in V8. Unlike libuv's rough update_loop_time method, V8 has a set of independent and complete classes responsible for managing time. Located in src/base/platform/time.h, this class is an auxiliary module. First, let's look at ...

Posted by ghgarcia on Thu, 23 May 2019 14:33:25 -0700

[Reading Notes] Effective C++(02) Construction/Destruction/Assignment

Author: LogM This article was originally published in https://segmentfault.com/u/logm/articles , no reloads allowed~ 2. Construction/Destruction/Assignment 2.1 Clause 05:C++ automatically writes default constructs, copy constructs, destructors, assignment functions //You thought you wrote an empty class without code class Empty{}; // In fact ...

Posted by pillot1005 on Sat, 18 May 2019 11:31:23 -0700

UE4 Editor Extended Trampling History

As the saying goes, first-class programming architecture, three-process programming UI. But in the process of game development, especially in the development of engine and tool chain, UI is a pit that can not be bypassed. UE4 is becoming more and more popular in major factories. Various tools emerge in endlessly. But compared with unity, Slate ...

Posted by jeancharles on Sat, 18 May 2019 02:54:52 -0700

C++ Foundation - Class Inheritance

1. Preface Well, this series of blogs has become an embarrassing Reading Note for C++ Primer Plus.When using C language, code reuse is often achieved by adding library functions, but one drawback is that the original written code is not fully applicable to the current situation.Class inheritance in OOP design is more flexible than it is. It can ...

Posted by Michan on Fri, 17 May 2019 21:58:34 -0700

Traversal of Graphs-breadth-first Traversal and Depth-first Traversal

Traversal of graphs: Starting from any vertex of a graph, all vertices in a graph can be accessed once and only once in a certain order. Traversing frequently Two methods are used: breadth-first traversal and depth-first traversal. Width-first traversal: Similar to the hierarchical traversal of trees. Let's assume that starting from a vertex v ...

Posted by webwired on Fri, 17 May 2019 19:12:57 -0700

Data Structure-Unordered Tree

Basic terminology: Node Degree: The number of children a node has in the book. Degree of a number: The maximum degree of all nodes in the tree. Leaf node (terminal node): node with zero degree. Branch node (non-terminal node): node with non-zero degree. Root node (start node): The first node in the tree. Internal nodes: Nodes in the tree other ...

Posted by jfarthing on Thu, 16 May 2019 12:17:10 -0700

Some Solutions to Codeforces Round #1 (Div. 2)

This game is a good ghost and beast. A question has broken down wa four times. The mentality has exploded directly. I wanted to give up treatment, but I found that BCD is a silly question. A. If at first you don't succeed... (Principle of inclusion and exclusion) Main idea of the title: Some $N individuals took the exam. Among those who pas ...

Posted by emcb_php on Thu, 16 May 2019 10:51:10 -0700

Valgrid Memory Problem Checking under linux

_c/c++ memory management has always been the most headache for programmers. Memory crossing, array crossing, memory leak, memory overflow, wild pointer, empty pointer, any problem may cause program crash. And often the source of the problem is relatively hidden, making it difficult to find out the root cause of the problem.If we want to solve t ...

Posted by nariman on Wed, 15 May 2019 07:47:59 -0700

Common Sorting Algorithms

Counting order: 1. A non-comparison-based sorting algorithm, proposed by Harold H. Seward in 1954, has the advantage of sorting integers in a certain range. Its time complexity is(n+k), where k is the range of integers, faster than any comparative sorting algorithm. 2. Steps: (a) Find the maximum Max and minimum min of a given sequence of i ...

Posted by arie_parie on Sat, 11 May 2019 15:12:52 -0700