[leetcode]73. Set Matrix Zeroes to 0

Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place. Example 1: Input: [ [1,1,1], [1,0,1], [1,1,1] ] Output: [ [1,0,1], [0,0,0], [1,0,1] ] Example 2: Input: [ [0,1,2,0], [3,4,5,2], [1,3,1,5] ] Output: [ [0,0,0,0], [0,4,5,0], [0,3,1,0] ]     ...

Posted by glowball on Sat, 02 Nov 2019 10:57:19 +0100

Rest framework learning quick start

This article mainly refers to the Rest Framework official website documents: https://www.django-rest-framework.org/  And then I realize my own personal summary. Development tools: Pycharm, python 3.7, Django 2.1, djangorest framework-3.9.4 Contents of this article New project: Serializer: View: urls.py: Configur ...

Posted by McMaster on Sat, 02 Nov 2019 04:27:30 +0100

(data structure) 1. Storage of adjacency matrix and adjacency table of implementation graph 2. Traversal algorithm of implementation graph

Experimental content 1. Write a program graph.cpp, design the adjacency matrix with weight graph and adjacency table creation and output operation, and on this basis, design a main program exp8-1.cpp to complete the following functions. (1) establish the adjacency matrix of digraph G as shown ...

Posted by trehy2006 on Fri, 01 Nov 2019 19:16:13 +0100

#Problem solving Report

Problem solving Report cf A Remove all existing ones, and take the maximum value + 1 for the rest #include <bits/stdc++.h> #define int long long using namespace std; signed main() { int T; cin>>T; while(T--) { int n,s,t; cin>>n>>s>>t; int k=s+t-n; s-=k,t-=k; int a ...

Posted by cbesh2 on Tue, 29 Oct 2019 20:06:05 +0100

Talk about the cache elimination algorithm LRU implementation principle

Preface We often use cache to improve data query speed. Due to the limited cache capacity, when the cache capacity reaches the upper limit, we need to delete some data and move out of space, so that new data can be added. Cache data cannot be deleted randomly. Generally, we need to delete cache data according to some algorithm. The commonly use ...

Posted by BinaryStar on Tue, 29 Oct 2019 03:15:24 +0100

[Leetcode problem solving algorithm weekly] issue 1

First appeared in the WeChat public's front-end growth notes, written in 2019.10.28 background This paper records the whole thinking process in the process of writing questions for reference. The main contents include: Assumption of topic analysis Write code validation Consult others' solution Thinking and summing up Catalog 1. Sum of two nu ...

Posted by Namadoor on Mon, 28 Oct 2019 12:18:05 +0100

Wechat applet configuration ESlint

When we write large projects such as React and Vue, or use the framework to build small programs, in order to facilitate the collaborative development of multiple people, we often introduce ESlint to standardize the code writing, so that different developers can write unified code. For native applet pro ...

Posted by witold on Mon, 28 Oct 2019 04:03:29 +0100

Notes on Python operation of MySQL

Python&MySQL Catalog Python&MySQL Introduction 1.1 database classification Two MySQL 2.1 grammar Overview of 2.1.1 2.1.2 add data 2.1.3 delete data 2.1.4 change data 2.2 MySQL DB module 2.2.1 connecting to the database 2.2.2 close database 2.2.3 query data 2.2.4 add data Three ORM 3. ...

Posted by jasonc310771 on Fri, 25 Oct 2019 14:24:31 +0200

java version of spring cloud microservice architecture b2b2c e-commerce platform -- basic configuration of Hystrix

1. [microcloud provider Dept Hystrix-8001] modify pom.xml configuration file, and add Hystrix configuration class: <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-hystrix</artifactId> </depend ...

Posted by LeslieHart on Tue, 22 Oct 2019 22:48:59 +0200

spring mvc uses @ InitBinder tag to bind form data

Original link: http://www.cnblogs.com/riasky/p/3509073.html In spring MVC, Date, double and other types are defined in the bean. Without any processing, Date and double cannot be bound. The solution is to use the @ InitBinder tag provi ...

Posted by gidiag on Thu, 17 Oct 2019 21:19:40 +0200