原创 116. Jump Game

116. Jump Game Given an array of non-negative integers, you are initially positioned at the first index of the array. E

原创 512. Decode Ways

public class Solution {     /**      * @param s: a string,  encoded message      * @return: an integer, the number of w

原创 114. 不同的路徑

114. 不同的路徑   有一個機器人的位於一個 m × n 個網格左上角。 機器人每一時刻只能向下或者向右移動一步。機器人試圖達到網格的右下角。 問有多少條不同的路徑? Example Notice n和m均不超過100 且答案保證在3

原创 Log Sorting

public class LogSorting {     /*      * 1380. Log Sorting      *       * Given a list of string logs, in which each ele

原创 2020.3.4 華爲春招筆試第一題AC

#include <stdio.h> #include <stdlib.h> /* 3 1 2 3 4 5 6 7 8 9 */ int main() {     int n;     scanf("%d",&n);     int m

原创 201503-2 試題名稱: 數字排序

#include <stdio.h> int main() { int n; scanf("%d",&n); int a[1001]; int k; int i, j; for(i=0; i<1001; i++)

原创 201604-2 試題名稱: 俄羅斯方塊

#include <stdio.h> int main() { int matrix[15][10]; int graphic[4][4]; int i, j, k; for(i=0; i<15; i++) { for(

原创 201803-1 試題名稱: 跳一跳

  #include <stdio.h> int main() { int i, sum, j; sum = 0; scanf("%d",&i); if( i == 1) sum++; else if ( i == 2)