原创 unity打靶遊戲的製作

 這次第一個作業是一個打靶遊戲,要用到老師上課所講的物理運動,對於這次作業來說,總結一下就是剛體和碰撞的運用,先上一個效果成品圖。 如圖所示,射出去的箭插在了靶上,左上角顯示得分情況和風力大小,正值代表指向x軸正方向的風力,負值代表指

原创 LeetCode#31. Next Permutation

題目: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of number

原创 LeetCode#96Unique Binary Search Trees

題目: Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example, Given n =

原创 LeetCode#11. Container With Most Water

題意:Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical l

原创 LeetCode#43. Multiply Strings

題目: Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2. Note

原创 Leetcode#17. Letter Combinations of a Phone Number

題意 題目解析: 一道字符串匹配的問題,就是模擬平常用九宮格手機短信的時候,輸入爲一串數字,然後找出每個數字對應的所有可能,算法如下: 申請vecotr<string> result,用來存放最終結果。申請vector<string>

原创 LeetCode#210 Course Schedule II(C++版)

題幹: There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisites,

原创 LeetCode#3.Longest Substring Without Repeating Characters

題目要求 Given a string, find the length of the longest substring without repeating characters. Examples: Given “abcabc

原创 Leetcode#49. Group Anagrams

題目:Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"]

原创 利用分治策略來解決最大子數組問題

求解一個數組的最大子數組,例如給定數組B[0,,,,,,n-1],就是找到滿足條件的一組i和j使得當i <= j時,有B[j] - B[i]的值達到最大。這裏我們很容易想到一種暴力求解的方法。從n個下標中任意選取兩個,就是n*(n-1)/

原创 Leetcode#15. 3Sum

題目: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets

原创 unity作業——簡單dotween的製作

這次作業,老師讓我們仿製一個簡單的dotween,擴展一下transform中的方法,在這裏我擴展了三個方法,使得例如調用transform.DoTranslate, transform.DoRotate,Transform.DoScal

原创 unity作業——關於粒子光環的設計

這次作業是讓我們做一個網站首頁的光環效果,網站如下:http://i-remember.fr/en          可以看出,粒子光環大約有兩層,外層粒子呈順時針旋轉,內層粒子呈逆時針旋轉,總的來說可以採用如下方式來設計,建立一個總的

原创 LeetCode#46 Permutation

題意: Given a collection of distinct numbers, return all possible permutations. For example,[1,2,3] have the following

原创 LeetCode#22. Generate Parentheses

題目: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For exam