[selected sword fingers] the problem of "symmetric binary tree" from a macro perspective
Title Description
This is the * * JZ 58 symmetric binary tree on Niuke. The difficulty is * *.
Tag: "sword finger Offer", "binary tree", "sequence traversal", "iteration", "recursion"
Description:
Please implement a function to judge whether a binary tree is symmetrical.
Note that if a bina ...
Posted by adrive on Fri, 21 Jan 2022 10:22:20 +0100
L3-007 ladder map
Title:
This question requires you to realize an exclusive online map of the ladder race. After the team members enter their school location and venue location, the map should recommend two routes: one is the fastest route to reach; One is the shortest route. The topic ensures that there is at least one reachable route on the map for any query ...
Posted by smnovick on Fri, 21 Jan 2022 07:00:55 +0100
Luogu P2078 friends
The idea is to divide into two parallel search sets, then calculate the number of men and women, and then directly compare them and choose the smaller one
The code is a little troublesome. It seems that it hasn't been handed in, although the result is right
In fact, a problem has been found in the first time, because the less than si ...
Posted by jds580s on Fri, 21 Jan 2022 06:49:39 +0100
Java data structure and algorithm_ Linear table_ Sequential list and linked list
Linear table
summary
Linear table is the most basic, simplest and most commonly used data structure.A linear table is a finite sequence of n data elements with the same characteristics.
Pioneer element: if element A is in front of element B, it is called the precursor element of B Successor element: if element B is after element a, it ...
Posted by mmitdnn on Fri, 21 Jan 2022 05:27:02 +0100
Travel - Dijkstra
Travel
Time limit: up to X use cases, 2 seconds (C/C + +), 2.5 seconds (Java)
There is currently a country with an N-row M-column grid model. Each cell represents a city. Every time you pass through a city, a toll will be generated.
A grand celebration will be held in a city in this country this summer. In order to participate in the celebrat ...
Posted by lemin on Fri, 21 Jan 2022 05:19:49 +0100
Learning notes of data structure, algorithm and application - C + + language description - linear table
1, Linear meter interface specification
Linear tables generally need to implement the following interfaces:
#pragma once
#include <iostream>
template<class T>
class linearList
{
public:
virtual ~linearList() {};
virtual bool empty() = 0;
virtual int size() const = 0;
virtual T& get(int index) const = 0;
virtual int in ...
Posted by beboo002 on Fri, 21 Jan 2022 02:46:20 +0100
The second course of artificial intelligence - logical regression
catalogue
1, Manual derivation of logistic regression gradient descent implementation
2, Classification of iris by logistic regression
Introduction to iris dataset
Introduction to linear classifier
Main steps of designing linear classifier
1. Collect a group of samples with category marks X={x1,x2,..., xN}
2. Determine a criterion functi ...
Posted by Renegade85 on Thu, 20 Jan 2022 21:20:42 +0100
Leetcode algorithm solution series - minimum stack
This topic aims to share some interesting or valuable topics found in the process of brushing Leecode. [of course, the answer is based on js].Topic relatedOriginal title addressTitle Description:To define the data structure of the stack, please implement a min function that can get the smallest element of the stack in this type. In this stack, ...
Posted by ppera on Thu, 20 Jan 2022 19:26:24 +0100
Foundation compaction: basic data structure and algorithm
In the previous chapter, we talked about 10 common data structures, and then we talked about 10 common algorithms.
Address of the previous chapter: Foundation compaction: Basic data structure and algorithm (I) , you can have a look if you don't know much.
10 common algorithms
The content of data structure research is how to organize t ...
Posted by spudmclard on Thu, 20 Jan 2022 18:41:33 +0100
Learning notes - point divide and conquer
preface
It's another algorithm that everyone knows. I can't just climb to learn~
realization
Point divide and conquer is usually used to solve the problem of path statistics on the tree.
In fact, the idea of point divide and conquer is very simple: we consider a tree with roots. Obviously, we can divide its paths into two categories: one is thr ...
Posted by rekha on Thu, 20 Jan 2022 15:18:45 +0100