题解列表

筛选

双向链表删除练习

解题思路:双向链表实现链表删除;在添加操作时比单链表多了一个指向前面的元素的操作;删除比单链表方便,这时的删除是直接指向当前要删除的元素,多了temp.pre.next=tem.next;temp.next.pre=temp.pre,但最后这个要防止空指针异常注意事项:求助!!!有两个运行超时,

2947(C++简单解)

AC代码:```cpp#includeusingnamespacestd;voidfindUnluckyMonths(intw){intdaysInMonth[]={31,28,31,30,31,30,31,31,30,31,30,31};intdaysOfWeek=w;for(intmonth=1;

陶陶摘苹果

摘要:解题思路:注意事项:一定要记得数组下标从0开始!!!参考代码:#include<stdio.h>int main(){    int a[10],n,count=0;    for(int i=0;i……

JAVA完数的判断

摘要:package com.iflytek.helloworld;/** * "Tools": "Created with IntelliJ IDEA", * "Company": "Copyright ……

年龄与疾病

摘要:解题思路:注意事项:打%要打两遍 %%参考代码:#include<stdio.h>int main(){    int n,a[1000];    scanf("%d",&n);    float z……

双指针|| 两数之和

```c++#include#include#includeusingnamespacestd;intmain(){intn,k;cin>>n>>k;vectornums(n,vector(n));for(inti=0;i>nums[i]

大小写问题

摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class 大小写问题 {    public static void main(String[] arg……

列出最简真分数序列

摘要:解题思路:注意事项:参考代码:public class Main {    public static void main(String[] args) {      go: for (int i =……

前m大的数,归并排序

#归并排序```c++#include#include#includeusingnamespacestd;intn,m;voidquick_sort(longlong*nums,intl,intr){if(l>=r)return;//获取中间元longlongx=nums[l+r>>1],