Skip to content

Instantly share code, notes, and snippets.

View Lemon-XQ's full-sized avatar
🎯
Focusing

Lemon-XQ Lemon-XQ

🎯
Focusing
View GitHub Profile
@Lemon-XQ
Lemon-XQ / findKthToTail.cpp
Created April 1, 2018 03:06
[单链表找倒数第k个数] #数据结构
typedef struct ListNode{
int data;
struct ListNode* next;
}ListNode;
ListNode* findKthToTail(ListNode* pHead,int k){
ListNode* pFast=pHead,pSlow=pHead;
if(pHead == null || k<=0 || k> ListLength(pHead))
return null;
if(pHead->next == null)
return pHead;
@Lemon-XQ
Lemon-XQ / WheelView.java
Created March 19, 2018 02:45
[滑动选择View(身高、体重、年龄等)]
/**
* @author: Lemon-XQ
* @date: 2017/12/10
*/
public class WheelView extends ScrollView {
public static final String TAG = WheelView.class.getSimpleName();
public static class OnWheelViewListener {
public void onSelected(int selectedIndex, String item) {
@Lemon-XQ
Lemon-XQ / PAT-Basic-1001.cpp
Last active February 25, 2018 09:07
[PAT-Basic] PAT乙级题解,大部分是自己写的,有一些参考了大神们的代码~更新中 #PAT-Basic
#include<iostream>
using namespace std;
main()
{
int n;
int count=0;
cin>>n;
while(n!=1){
if(n%2==0)