原创 快速排序

void myQuickSort(int* arr,int l,int r) { /*baseline of recurision*/ /*at least two numbers*/ if(l >= r)

原创 冒泡排序

void myBubbleSort(int *arr,int n, bool asc) { int i,j; /* * question 1:why i < n-1 * question 2:why j begi

原创 Mac 入門篇

旨在引導新手入門Mac的系統 OS X or Mac OS X is Unix-based operating system developed by Apple Inc. for Macintosh computers. It cont

原创 瑪雅人的密碼(C#)

題目描述 瑪雅人有一種密碼,如果字符串中出現連續的2012四個數字就能解開密碼。給一個長度爲N的字符串,(2=<N<=13)該字符串中只含有0,1,2三種數字,問這個字符串要移位幾次才能解開密碼,每次只能移動相鄰的兩個數字。例如02

原创 PMP-人力資源管理

人力資源管理分爲組建團隊-建設團隊-管理團隊。輸入:過程組織資產+企業環境要素+項目管理計劃工具:組織圖+互動網絡+組織理論輸出:項目組織結構+人員配對管理計劃+角色與職責組建團隊輸入:項目組織結構圖+角色與職責+人員配對管理計劃工具:談

原创 LeetCode_23

using System; using System.Collections.Generic; namespace Leetcode_23 { public class Solution { public ListNode M

原创 最小花費(C#)

題目描述 在某條線路上有N個火車站,有三種距離的路程,L1,L2,L3,對應的價格爲C1,C2,C3.其對應關係如下: 距離s            票價  0<S<=L1         C1  L1<S<=L2      

原创 特殊乘法(C#)

題目描述 寫個算法,對2個小於1000000000的輸入,求結果。 特殊乘法舉例:123 * 45 = 1*4 +1*5 +2*4 +2*5 +3*4+3*5  private static Int64 queryMul(Int64

原创 PMP-整體管理

  PMP領域包括整體管理、範圍管理、時間管理、成本管理、質量管理、人力資源管理、溝通管理、風險管理、採購管理。一個項目的階段總是包括啓動、計劃、執行、監控、收尾五個階段。  整體管理所要完成的工作就是在制定項目章程、制定初步範圍說明書,

原创 最大序列和(C#)

題目描述 給出一個整數序列S,其中有N個數,定義其中一個非空連續子序列T中所有數的和爲T的“序列和”。 對於S的所有非空連續子序列T,求最大的序列和。 變量條件:N爲正整數,N≤1000000,結果序列和在範圍(-2^63,2^63-

原创 Leetcode_16

void quicksort(int* nums,int low,int high); int partition(int* nums,int low,int high); int threeSumClosest(int* nums,

原创 Leetcode_17

/** * Return an array of size *returnSize. * Note: The returned array must be malloced, assume caller calls free().

原创 大數取模公式的理解

大數取模公式的理解 公式:(a+b)%m=(a%m+b%m)%m。 所以大數比如1234%m可以拆分爲:*1234=((1*10+2)*10+3)*10+4 mod m。 然後有代碼: int num=0; for(int i=0

原创 Leetcode_19

/** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; *

原创 Leetcode_14

int queryCommonPrefix(char* s1,char* s2); char* longestCommonPrefix(char** strs, int strsSize) { if(strsSize == 0