原创 Git 設置不用每次輸入密碼

操作步聚如下:   1: cd 回車;進入當前用戶目錄下;   2: vim .git-credentials    3:按照以下格式輸入內容:   https://{username}:{password}@github.com   其

原创 解析np.max

首先看np.max函數返回爲 Return the maximum of an array or maximum along an axis 一個是數組的最大值,另一個是沿着軸的最大值。首先一個數組的最大值好理解,主要是沿着某個軸的最大值

原创 百度 2020校招 計算機視覺算法(2019.9.24)第二道編程題AC

原文鏈接:https://www.cnblogs.com/wzgg/p/11551840.html #include<bits/stdc++.h> using namespace std;

原创 python實現二叉樹的建立以及遍歷(遞歸前序、中序、後序遍歷,隊棧前序、中序、後序、層次遍歷)

原文鏈接:https://www.cnblogs.com/ybf-yyj/p/8717601.html #-*- coding:utf-8 -*- class Node: def __

原创 馬蜂窩 2020校招 算法方向(2019.9.23)第一道編程題

class Node: def __init__(self,data): self.data=data self.lchild=None self.rchild=None c

原创 【LeetCode】236.二叉樹的最近公共祖先 (Python)

原文鏈接:https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-tree/solution/shi-yong-zi-

原创 騰訊技術研究類和數據分析第三次筆試(2019.9.20)第一道編程題AC

n, m = list(map(int, input().split())) N = list(map(int, input().split())) M = list(map(int, input().split())) N.sort

原创 【LeetCode】92.反轉鏈表 (Python)

原文鏈接:https://leetcode-cn.com/problems/reverse-linked-list-ii/solution/using-c-by-crunch-2/ https:

原创 C/C++ sizeof函數解析——解決sizeof求結構體大小的問題

原文鏈接:https://www.cnblogs.com/0201zcr/p/4789332.html  C/C++中不同數據類型所佔用的內存大小                      32

原创 【LeetCode】33 & 81.搜索旋轉排序數組 (Python)

33.搜索排序數組 https://leetcode-cn.com/problems/search-in-rotated-sorted-array/ 假設按照升序排序的數組在預先未知的某個點上進行了旋轉。 ( 例如,數組 [0,1,2,4

原创 Leetcode 股票問題動態規劃一鍋端

原文鏈接:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/solution

原创 攜程算法次筆試(2019.9.4)第二道編程題AC

    N = int(input()) gt, pre = [], [] for _ in range(N): temp = list(map(float, input().split())) gt.append(t

原创 【LeetCode】743.網絡延遲時間 (Python) 和 Dijkstra算法

題目地址:https://leetcode-cn.com/problems/network-delay-time/ 題目描述: 有 N 個網絡節點,標記爲 1 到 N。 給定一個列表 times,表示信號經過有向邊的傳遞時間。 times

原创 360 2020技術綜合筆試(2019.8.31)編程題雙AC

  s = input() m = {} maximum = 0 for i in s: if i not in m: count = 0 m[i] = i for j in s

原创 算法工程師之排序算法-Python

一個合格的算法工程師應該具有熟練寫各種排序算法的本領 1,快速排序(n*logn) 分治法,主要是它的劃分過程,即選取一個值將list中不大於該數的放在該數左邊,不小於該數的放在該數右邊,然後分別對左右兩個區間遞歸劃分。 def sor