- 博客(2)
- 收藏
- 关注
原创 一道百度笔试题
void init_pro(int *a,int size,PR *lhead) { int i=0,j=0,lim=-1; PR *record=lhead; for(;i { for(j=1;i+jlim&&a[i+j]==a[i-j];j++); //判断回文并作适当的标记 if(j!=1) { record->next=new PR;
2014-08-09 22:13:59
453
原创 Leetcode: Reorder List
Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes' values. For example, Given {1,2,3,4}, reorder it to
2014-05-10 19:31:20
276
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅