Skip to content

Instantly share code, notes, and snippets.

Lemon-XQ Lemon-XQ

View GitHub Profile
@Lemon-XQ
Lemon-XQ / findKthToTail.cpp
Created Apr 1, 2018
[单链表找倒数第k个数] #数据结构
View findKthToTail.cpp
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 Mar 19, 2018
[滑动选择View(身高、体重、年龄等)]
View WheelView.java
/**
* @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 Feb 25, 2018
[PAT-Basic] PAT乙级题解,大部分是自己写的,有一些参考了大神们的代码~更新中 #PAT-Basic
View PAT-Basic-1001.cpp
#include<iostream>
using namespace std;
main()
{
int n;
int count=0;
cin>>n;
while(n!=1){
if(n%2==0)
You can’t perform that action at this time.