Skip to content

Instantly share code, notes, and snippets.

View ZiKT1229's full-sized avatar
🎯
Focusing

KT_Zheng ZiKT1229

🎯
Focusing
View GitHub Profile
@ZiKT1229
ZiKT1229 / ExampleOne
Last active July 25, 2018 06:46
linearSearchExample
void linearSearch(int array[])
{
for (int i=0; i<array_size; i++)
if (array[i]==5)
cout<<array[i];
}
@ZiKT1229
ZiKT1229 / ExampleOne
Created July 9, 2018 08:04
BinarySearchExample
void binarySearch(int array[], int aim)
{
int left=0, right=array_size-1, mid, ans;
while (left<=right)
{
mid=(left+right)/2;
if (array[mid]<aim)
left=mid+1;
else if (array[mid]>aim)
right=mid-1;
@ZiKT1229
ZiKT1229 / queue
Last active July 25, 2018 08:11
stack and queue with c++
#include <iostream>
#include <queue>
using namespace std;
int main()
{
queue<int> myQueue;
for (int i=0; i<5; i++)
myQueue.push(i); //放數字進去
@ZiKT1229
ZiKT1229 / README.md
Created November 6, 2018 07:03 — forked from straker/README.md
Basic Snake HTML Game

Basic Snake HTML Game

Snake is a fun game to make as it doesn't require a lot of code (less than 100 lines with all comments removed). This is a basic implementation of the snake game, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration