数组和链表OJ题

   leetcode用编译器调试的技巧

 数组和链表练习题

leetcode/reverse_Link/main.c · Hera_Yc/bit_C_学习 - 码云 - 开源中国

1、移除元素

​​​​​​27. 移除元素 - 力扣(LeetCode)

int removeElement(int* nums, int numsSize, int val)
{
	int src = 0, dst = 0;
	//用src替换dst
	while (src < numsSize)
	{
		if (nums[src] != val)
		{
			nums[dst] = nums[src];
			src++;
			dst++;
		}
		else
		{
			++src;
		}
	}
	return dst;
}

2、删除排序数组中的重复项 

26. 删除有序数组中的重复项 - 力扣(LeetCode)

int removeDuplicates(int* nums, int numsSize) 
{
	int prev = 0;
	int cur = prev+1;
	int dst = 0;

	while (cur < numsSize)
	{
		if (nums[prev] == nums[cur])
		{
			prev++;
			cur++;
		}
		else
		{
			nums[dst] = nums[prev];
			dst++;
			prev++;
			cur++;
		}
	}
	nums[dst] = nums[prev];
	dst++;
	return dst;

}

3、 数组形式的加法

989. 数组形式的整数加法 - 力扣(LeetCode)
 

//数组形式的加法
//大数的加法
int* addToArrayForm(int* num, int numSize, int k,int* returnSize)
{
	int KSize = 0;//求出K的位数
	int Num = k;
	while (Num)
	{
		Num /= 10;
		KSize++;
	}

	//比较K的位数和数组的长度谁大?最终结果的位数:一定是大的那位+1(或者就是最大的那一位)
	//保险起见:我们用大一位开辟内存
	//calloc初始化一下
	int* retArr = (int*)calloc((KSize > numSize ? KSize + 1 : numSize + 1),sizeof(int));

	int tmp = 0;
	int cur = numSize - 1;
	int flag = 0;//进位

	//对于retArr可以倒着放,也可以正着放,然后逆置
	int reti = 0;
	int len = KSize > numSize ? KSize : numSize;
	while (len--)
	{
		int tmpn = 0;
		if (cur >= 0)
		{
			tmpn = num[cur];
		}
		tmp = k % 10;
		k = k / 10;
		retArr[reti] = tmp + tmpn + flag;//完成每一位的计算

		if (retArr[reti] >= 10)
		{
			retArr[reti] = retArr[reti] - 10;
			flag = 1;//如果进位了
		}
		else
		{
			flag = 0;
		}
		cur--;
		reti++;
	}
	//观察进位符号是否为1:
	if (flag == 1)
	{
		retArr[reti] = 1;//首位
		reti++;
	}

	//逆置
	int left = 0;
	int right = reti - 1;
	while (left < right)
	{
		int tmp = retArr[left];
		retArr[left] = retArr[right];
		retArr[right] = tmp;
		left++;
		right--;
	}
	*returnSize = reti;
	return retArr;
}

int main()
{
	int arr[4] = { 3,4 };
	int k = 1200;
	//1334
	int size = 0;
	int* p = NULL;
	p=addToArrayForm(arr, 2, k,&size);
	int i = 0;
	for (i = 0; i < 4; i++)
	{
		printf("%d ", p[i]);
	}
}
4、反转链表

反转链表(逆置单链表),可以说是链表最关键的操作之一。(两种方法)。

206. 反转链表 - 力扣(LeetCode)

 //三指针逆方向
struct ListNode* reverseList(struct ListNode* head) 
{
    if(head==NULL||head->next==NULL)
    {
        return head;
    }
    else
    {
        struct ListNode* cur=head;
        struct ListNode* prev=NULL;
        while(cur!=NULL)
        {
            struct ListNode* tmp=cur->next;
            cur->next=prev;
            prev=cur;
            cur=tmp;
        }
    return prev;
    }
}

//头插法
//头插创建新链表
//取cur头插到以newhead为头的新链表中
struct ListNode* reverseList(struct ListNode* head)
{
    struct ListNode* newhead = NULL; //新链表的头结点
    struct ListNode* cur = head;
    struct ListNode* next = NULL;
    while (cur != NULL)
    {
        next = cur->next;   //保存cur的下一个结点

        cur->next = newhead;  //头插:把cur看作待插入的新结点
        newhead = cur;

        cur = next;
    }
    return newhead;
}//头插更容易理解
5、删除所有给定值的结点

203. 移除链表元素 - 力扣(LeetCode)

struct ListNode* removeElements(struct ListNode* head, int val) 
{
    struct ListNode* prev=NULL;
    struct ListNode* cur=head;
    struct ListNode* next=NULL;
    while(cur)
    {
        if(cur->val==val)
        {
            if(cur==head)
            {
                head=cur->next;
                free(cur);
                cur=head;
            }
            else
            {
                prev->next=cur->next;
                free(cur);
                cur=prev->next;
            }
        }
        else 
        {
            prev=cur;
            cur=cur->next;
        }
        
    }
    return head;
}
6、 链表的中间结点

链表中的双指针问题:快慢指针

对于一个单链表来说:

  1. 快指针每次走两步。
  2. 慢指针每次走一步。
  3. 当快指针走到时,慢指针恰好在链表的中间。

这里对结点个数不同的链表,快指针有所差异(所指向的的不同)。

876. 链表的中间结点 - 力扣(LeetCode)

struct ListNode* middleNode(struct ListNode* head) {
    if (head->next == NULL) {
        return head;
    } else {
        struct ListNode* cur = head;
        int count = 0;
        while (cur != NULL) {
            count++;
            cur = cur->next;
        }
        count = count / 2;
        cur = head;
        while (count) {
            cur = cur->next;
            count--;
        }
        return cur;
    }
}

//追加:要求只能遍历链表一次
struct ListNode* middleNode(struct ListNode* head) {
    struct ListNode* slow = head;
    struct ListNode* fast = head;
    while (fast != NULL && fast->next != NULL) {
        slow = slow->next;
        fast = fast->next->next;
    }
    return slow;
}

7、输入一个链表,输出该链表中倒数第k个结点(双指针变形)。

struct ListNode* func(struct ListNode* head, int k)
 {
     struct ListNode* slow = head;
     struct ListNode* fast = head;
     while (k--&&fast)
     {    //k有可能大于链表的长度
         fast = fast->next;
     }
     if (fast == NULL) return NULL;
     while (fast)
     {
         slow = slow->next;
         fast = fast->next;
     }
     return slow;
 }
8、合并有序链表

21. 合并两个有序链表 - 力扣(LeetCode)

struct ListNode* mergeTwoLists(struct ListNode* list1, struct ListNode* list2)
{
    // 取小节点下来尾插
    if (list1 == NULL && list2 == NULL)
        return NULL;
    if (list1 == NULL)
        return list2;
    if (list2 == NULL)
        return list1;

    struct ListNode* head = NULL;
    struct ListNode* tail = NULL;
    if (list1->val < list2->val)
    {
        head = tail = list1;
        list1 = list1->next;
    }
    else
    {
        head = tail = list2;
        list2 = list2->next;
    }
    //取小的尾插 
    while (list1 && list2)
    {
        if (list1->val < list2->val)
        {
            tail->next = list1;
            list1 = list1->next;
        }
        else {
            tail->next = list2;
            list2 = list2->next;
        }
        tail = tail->next;
    }
    if (list1 == NULL)
    {
        tail->next = list2;
    }
    if (list2 == NULL)
    {
        tail->next = list1;
    }
    return head;
    
}

//方法二:哨兵位
struct ListNode* mergeTwoLists2(struct ListNode* list1, struct ListNode* list2) {
    //带头结点的链表(哨兵位)
    if (list1 == NULL && list2 == NULL)
        return NULL;
    if (list1 == NULL)
        return list2;
    if (list2 == NULL)
        return list1;

    struct ListNode* head = NULL;
    struct ListNode* tail = NULL;
    //带哨兵位的头结点,不存储有效数据,主要是方便尾插
    head = tail = (struct ListNode*)malloc(sizeof(struct ListNode));

    //取小的尾插 
    while (list1 && list2)
    {
        if (list1->val < list2->val)
        {
            tail->next = list1;
            list1 = list1->next;
        }
        else {
            tail->next = list2;
            list2 = list2->next;
        }
        tail = tail->next;
    }
    if (list1 == NULL)
    {
        tail->next = list2;
    }
    if (list2 == NULL)
    {
        tail->next = list1;
    }
    struct ListNode* realhead = head->next;
    free(head);
    head = NULL;
    return realhead;
}

   哨兵位:head = tail = (struct ListNode*)malloc(sizeof(struct ListNode)),这里的head就是哨兵,不存储任何数据,只是在尾插时不需要对list进行判断。哨兵位对尾插来说更加方便,但在绝大多数的oj题中,链表一般是不带哨兵位的,第一个头结点存储的有数据。

 9、链表分割

链表分割_牛客题霸_牛客网(双哨兵位尾插链表)

这里的maxtail不置空会产生环.

struct ListNode* partition(struct ListNode* phead, int x)
{
    // write code here
    //把pHead的结点拿出来,分两个尾插:
    //可以尾插,亦可以头插然后反转
    //小于x插一次,大于x的插一次
    //最后整合两个链表,释放哨兵
    //1.空链表
    //if(phead==NULL)return NULL;
    //2.只有一个结点
    //if(phead->next==NULL)return phead;
    //1和2合并
    if (phead == NULL || phead->next == NULL)return phead;
    //3.有1个以上的结点
    //开辟两个哨兵
    struct ListNode* minhead = (struct ListNode*)malloc(sizeof(struct ListNode));
    struct ListNode* maxhead = (struct ListNode*)malloc(sizeof(struct ListNode));
    struct ListNode* cur = phead;
    struct ListNode* mintail = minhead;
    struct ListNode* maxtail = maxhead;
    //初始化:防止内存错误
    minhead->next = NULL;
    maxhead->next = NULL;
    while (cur)
    {
        /*链表在这里构成环了,导致的死循环*/
        if (cur->val < x)
        {
            mintail->next = cur;
            mintail = mintail->next;
        }
        else
        {
            maxtail->next = cur;
            maxtail = maxtail->next;
        }
        cur = cur->next;
    }
    mintail->next = maxhead->next;

    maxtail->next = NULL;//防止环的生成

    struct ListNode* realhead = minhead->next;
    free(minhead);
    minhead = NULL;
    free(maxhead);
    maxhead = NULL;
    return realhead;
}
10、回文链表

链表的回文结构_牛客题霸_牛客网(回文链表=链表逆置+链表的中间结点)

struct ListNode* reverseList(struct ListNode* head) {
        struct ListNode* newhead = NULL;  //新链表的头结点
        struct ListNode* cur = head;
        struct ListNode* next = NULL;
        while (cur != NULL) {
            next = cur->next;   //保存cur的下一个结点

            cur->next = newhead;  //头插:把cur看作待插入的新结点
            newhead = cur;

            cur = next;
        }
        return newhead;
    }//头插更容易理解

bool chkPalindrome(ListNode* A) {
    // write code here
    ListNode* fast = A;
    ListNode* slow = A;
    ListNode* prev = NULL;
    while (fast && fast->next) {
        prev = slow;
        slow = slow->next;
        fast = fast->next->next;
    }//利用快慢指针找到那个中间结点

    prev->next = NULL;//分割前后两个链表

    slow = reverseList(slow);//反转后一半链表

    //逐一比较
    while (A) {
        if (A->val != slow->val) {
            return false;
        } else {
            A = A->next;
            slow = slow->next;
        }
    }
    return true;
}
11、相交链表的公共节点

160. 相交链表 - 力扣(LeetCode)

#include <math.h>
 struct ListNode* getIntersectionNode(struct ListNode* headA,
     struct ListNode* headB) {
     // 用相交结点的地址去比
     // 不能用结点的值去比,因为不同的结点可以存相同的值
     struct ListNode* curA = headA;
     struct ListNode* curB = headB;

     //这里用第二种思路:用两个链表的差值
     int la = 0;
     int lb = 0;
     while (curA) {
         la++;
         curA = curA->next;
     }//求链表A的长度
     while (curB) {
         lb++;
         curB = curB->next;
     }//求链表B的长度

     struct ListNode* longList = headA;
     struct ListNode* shortList = headB;

     if (lb > la) {
         longList = headB;
         shortList = headA;
     }
     int gap = abs(la - lb);//求两链表的长度差

     while (gap--) {        //让长的链表先走gap步
         longList = longList->next;
     }//这步操作的结果使:longList和shortList距离链表的末尾一样近

     while (longList) {
         if (longList == shortList)
             //比较的只能是地址,不能是值,即使两个结点值相同,也有可能不是同一个结点
             return longList;
         longList = longList->next;
         shortList = shortList->next;
     }
     return NULL;
 }

12、环形链表 i

141. 环形链表 - 力扣(LeetCode)(快慢指针)

bool hasCycle(struct ListNode *head) {
    struct ListNode* slow=head;
    struct ListNode* fast=head;
    while(fast&&fast->next!=NULL)
    {
        slow=slow->next;
        fast=fast->next->next;
        if(fast==slow)
        {
            return true;
        }
    }
    return false;
}

 13、环形链表ii

142. 环形链表 II - 力扣(LeetCode)

这里有个很难理解的方法:待补充……

14、复杂链表的复制

138. 随机链表的复制 - 力扣(LeetCode)

struct Node* copyRandomList(struct Node* head)
{
    if (head == NULL)return NULL;
    struct Node* cur = head;
    //1.将拷贝结点链接在原结点的后面
    while (cur)
    {
        //构造拷贝结点
        struct Node* copy = (struct Node*)malloc(sizeof(struct Node));
        copy->next = NULL;
        copy->random = NULL;
        copy->val = cur->val;

        copy->next = cur->next;
        cur->next = copy;

        cur = copy->next;
    }
    //2.处理拷贝结点的随机指针random
    /*
    *这里有个较难理解的点:
    * 1.对于拷贝结copy点来说:它的random指针指向的必须是拷贝结点.
    * 2.对于原结点cur来说:它的random指针指向的是原结点
    * 3.cur->random:是cur随机指针指向的原结点
    * 4.对于任何一个原结点来说:它后面的结点就是自己的拷贝结点
    * 因此:
    * 5. copy->random = cur->random->next
    */
    cur = head;
    while (cur)
    {
        struct Node* copy = cur->next;
        if (cur->random != NULL)
            copy->random = cur->random->next;
        else
            copy->random = NULL;
        cur = copy->next;
    }
    //3.拆解出拷贝链表
    cur = head;
    struct Node* copyHead = head->next;
    while (cur)
    {
        struct Node* copy = cur->next;
        struct Node* next = copy->next;

        cur->next = next;
        if (next != NULL)
            copy->next = next->next;
        else
            copy->next = NULL;
        cur = next;
    }
    return copyHead;
}
//leetcode这道题的C底层有错误,不能通过,只能用C++来实现

15、 对链表进行插入排序

147. 对链表进行插入排序 - 力扣(LeetCode)(需要画图详解)

struct ListNode* insertionSortList(struct ListNode* head) {
    // struct ListNode* phead=(struct ListNode*)malloc(sizeof(struct ListNode));
    if (head == NULL || head->next == NULL)
        return head;
    struct ListNode* sorthead = head;
    struct ListNode* cur = head->next;
    sorthead->next = NULL;
    // sorthead做头结点,不断取结点插入sorthead中,不断头插/尾插/中间插入
    while (cur) {
        struct ListNode* next = cur->next;

        // 把cur插入到sorthead中,并且保持链表有序
        if (cur->val <= sorthead->val) {
            // 头插
            cur->next = sorthead;
            sorthead = cur;
        } else {
            // 中间或尾插
            struct ListNode* sortprev = sorthead;
            struct ListNode* sortcur = sortprev->next;
            while (sortcur) {
                if (sortcur->val >= cur->val) {
                    sortprev->next = cur;
                    cur->next = sortcur;
                    break;
                } else {
                    sortprev = sortcur;
                    sortcur = sortcur->next;
                }
            }
            if (sortcur == NULL) {
                sortprev->next = cur;
                cur->next = NULL;
            }
        }
        cur = next;
    }
    return sorthead;
}
//取结点往sorthead插入
16、删除链表重读元素

82. 删除排序链表中的重复元素 II - 力扣(LeetCode)

struct ListNode* deleteDuplicates(struct ListNode* head) {
    if (head == NULL || head->next == NULL)
        return head;
    struct ListNode* prev = NULL;
    struct ListNode* cur = head;
    struct ListNode* next = cur->next;

    while (next) {
        if (cur->val != next->val) {
            prev = cur;
            cur = next;
            next = next->next;
        } else {
            while (next != NULL && cur->val == next->val) {
                next = next->next;
            }
            // 不free掉这些结点也不会报错
            if (prev != NULL) {
                prev->next = next;
            } else {
                head = next;
            }
            // 释放
            while (cur != next) {
                struct ListNode* del = cur;
                cur = cur->next;
                free(del);
            }
            if (next != NULL)
                next = next->next;
        }
    }
    return head;
}//这道题对链表的边界有很深的考察

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/926020.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

VSCode 使用教程:项目使用配置、使用哪些插件、Live Server使用问题及解决方案(你想要的,都在这里)

VSCode的配置&#xff1a; Ⅰ、VSCode 可能需要的项目配置&#xff1a;1、项目颜色主题的切换&#xff1a;其一、点击设置 -> 选择主题 -> 选择颜色主题&#xff1a;其二、通过上下键操作&#xff0c;选择想要的主题&#xff1a; 2、项目文件图标主题的切换&#xff1a;其…

28 基于51单片机的两路电压检测(ADC0808)

目录 一、主要功能 二、硬件资源 三、程序编程 四、实现现象 一、主要功能 基于51单片机&#xff0c;通过ADC0808获取两路电压&#xff0c;通过LCD1602显示 二、硬件资源 基于KEIL5编写C代码&#xff0c;PROTEUS8.15进行仿真&#xff0c;全部资源在页尾&#xff0c;提供…

宠物空气净化器推荐2024超详细测评 希喂VS霍尼韦尔谁能胜出

最近有粉丝一直在评论区和后台探讨宠物空气净化器是不是智商税的问题&#xff0c;有人认为宠物空气净化器肯定不是智商税&#xff0c;有些人认为将其购回家就是个没用的东西&#xff0c;还占地方&#xff0c;双方各有自己的观点。 其实宠物空气净化器和普通的空气净化器是有很大…

鸿蒙学习笔记:CheckboxGroup组件

本次鸿蒙CheckboxGroup组件实战&#xff0c;先创建CheckboxGroupDemoAbility与CheckboxGroupDemo.ets页面&#xff0c;在ets页面以Row、Column布局呈现界面。利用CheckboxGroup管理爱好相关Checkbox&#xff0c;通过状态记录及“确定”按钮实现选择展示。设置页面为首页后启动应…

[Java]微服务之分布式事务

介绍 下单业务&#xff0c;前端请求首先进入订单服务&#xff0c;创建订单并写入数据库。然后订单服务调用购物车服务和库存服务: 购物车服务负责清理购物车信息库存服务负责扣减商品库存 问题分析: 下单过程中, 订单服务创建订单, 插入自己的数据库, 执行成功购物车服务, 清…

如何在谷歌浏览器中使用开发者工具调试网页

在数字时代&#xff0c;网页开发和调试已成为每个前端开发人员必备的技能。谷歌浏览器&#xff08;Google Chrome&#xff09;提供了强大的开发者工具&#xff0c;帮助开发者快速定位和修复网页中的问题。本文将详细介绍如何使用Chrome开发者工具来调试网页&#xff0c;同时也会…

新增工作台模块,任务中心支持一键重跑,MeterSphere开源持续测试工具v3.5版本发布

2024年11月28日&#xff0c;MeterSphere开源持续测试工具正式发布v3.5版本。 在这一版本中&#xff0c;MeterSphere新增工作台模块&#xff0c;工作台可以统一汇总系统数据&#xff0c;提升测试数据的可视化程度并增强对数据的分析能力&#xff0c;为管理者提供测试工作的全局…

在Springboot项目中实现将文件上传至阿里云 OSS

oss介绍 阿里云对象存储服务&#xff08;OSS&#xff09;是一种高效、安全和成本低廉的数据存储服务&#xff0c;可以用来存储和管理海量的数据文件。本文将教你如何使用 Java 将文件上传到阿里云 OSS&#xff0c;并实现访问文件。 1. 准备工作 1.1 开通 OSS 服务 登录阿里云…

CrystalDiskInfo:硬盘健康监测工具简介和下载

原论坛给你更好的阅读体验&#xff1a;CrystalDiskInfo&#xff1a;硬盘健康监测工具简介和下载 | 波波论坛 引言 在日常使用电脑时&#xff0c;硬盘的健康状态对于系统的稳定性和数据的安全性至关重要。硬盘出现故障可能会导致数据丢失&#xff0c;严重时甚至会使整个系统无…

springboot339javaweb的新能源充电系统pf(论文+源码)_kaic

毕 业 设 计&#xff08;论 文&#xff09; 题目&#xff1a;新能源充电系统的设计与实现 摘 要 如今社会上各行各业&#xff0c;都喜欢用自己行业的专属软件工作&#xff0c;互联网发展到这个时候&#xff0c;人们已经发现离不开了互联网。新技术的产生&#xff0c;往往能解…

【第三讲】Spring Boot 3.4.0 新特性详解:增强的配置属性支持

Spring Boot 3.4.0 版本在配置属性的支持上进行了显著增强&#xff0c;使得开发者能够更灵活地管理和使用应用程序的配置。新的特性包括对配置属性的改进、类型安全增强、以及对环境变量的更好支持。这些改进旨在提升开发效率和代码可读性&#xff0c;同时简化配置过程。本文将…

龙迅#LT6912适用于HDMI2.0转HDMI+LVDS/MIPI,分辨率高达4K60HZ,支持音频和HDCP2.2

1. 描述 LT6912是一款高性能的HDMI2.0转HDMI和LVDS和MIPI转换器。 HDMI2.0 输入和输出均支持高达 6Gbps 的数据速率&#xff0c;为4k60Hz视频提供足够的带宽。此外&#xff0c;还支持 HDCP2.2 进行数据解密&#xff08;无数据 加密&#xff09;。 对于 LVDS 输出&#xff0c…

彻底理解微服务配置中心的作用

常见的配置中心有SpringCloudConfig、Apollo、Nacos等&#xff0c;理解它的作用&#xff0c;无非两点&#xff0c;一是配置中心能做什么&#xff0c;不使用配置中心会出现什么问题。 作用&#xff1a;配置中心是用来集中管理服务的配置&#xff0c;它是用来提高系统配置的维护…

MySQL数据库表的操作

1、总述 今天我跟大家分享MySQL数据库中表的创建&#xff0c;查看&#xff0c;修改&#xff0c;删除。 2、创建表 create table table_name ( field1 datatype, field2 datatype, field3 datatype ) character set 字符集 collate 校验规则 engine 存储引擎; 说明&#xff1…

摄影相关常用名词

本文介绍与摄影相关的常用名词。 曝光 Exposure 感光元件接收光线的过程&#xff0c;决定图像的明暗程度和细节表现。 光圈 Aperture 控制镜头进光量的孔径大小&#xff0c;用 F 值&#xff08;f-stop&#xff09; 表示。 光圈越大&#xff08;F 值越小&#xff09;&#xff0c…

使用 VLC 在本地搭建流媒体服务器 (详细版)

提示&#xff1a;详细流程 避坑指南 Hi~&#xff01;欢迎来到碧波空间&#xff0c;平时喜欢用博客记录学习的点滴&#xff0c;欢迎大家前来指正&#xff0c;欢迎欢迎~~ ✨✨ 主页&#xff1a;碧波 &#x1f4da; &#x1f4da; 专栏&#xff1a;音视频 目录 借助VLC media pl…

C++之C++11新特性(三)--- 智能指针

目录 一、智能指针 1.1 为什么需要智能指针 1.2 内存泄漏 1.2.1 内存泄漏的基本概念 1.2.2 内存泄漏的分类 1.2.3 如何避免内存泄漏 1.3 智能指针的使用及其原理 1.3.1 RAII 1.3.2 智能指针的基本原理 1.3.3 auto_ptr 1.3.4 unique_ptr 1.3.5 shared_ptr 1.3.6 sha…

Elasticearch索引mapping写入、查看、修改

作者&#xff1a;京东物流 陈晓娟 一、ES Elasticsearch是一个流行的开源搜索引擎&#xff0c;它可以将大量数据快速存储和检索。Elasticsearch还提供了强大的实时分析和聚合查询功能&#xff0c;数据模式更加灵活。它不需要预先定义固定的数据结构&#xff0c;可以随时添加或修…

golang版本管理工具:scoop使用

安装 Scoophttps://scoop.sh/根据官方文档安装。 第一步&#xff1a;打开PowerShell。(注意不要使用管理员方式打开&#xff0c;否则在执行安装Scoop的过程中&#xff0c;会报错。) 第二步&#xff1a;切到C盘根目录下。 第三步&#xff1a; Set-ExecutionPolicy -Executi…

USB Type-C一线通扩展屏:多场景应用,重塑高效办公与极致娱乐体验

在追求高效与便捷的时代&#xff0c;启明智显USB Type-C一线通扩展屏方案正以其独特的优势&#xff0c;成为众多职场人士、娱乐爱好者和游戏玩家的首选。这款扩展屏不仅具备卓越的性能和广泛的兼容性&#xff0c;更能在多个应用场景中发挥出其独特的价值。 USB2.0显卡&#xff…