
数据结构
菜园赤子
这个作者很懒,什么都没留下…
展开
-
C#手写简单的的List
1、定义自己的IMyList接口namespace DataStructure{ public interface IMyList<T> { T this[int index] { get; set; } void Add(T value); bool Contains(T value); vo...原创 2019-06-06 00:44:16 · 422 阅读 · 0 评论 -
C#手写简单的的ArrayList
1、定义自己的IMyList接口namespace DataStructure{ public interface IMyList { object this[int index] { get; set; } void Add(object value); bool Contains(object value); ...原创 2019-06-06 16:02:04 · 194 阅读 · 0 评论 -
C#手写简单的LinkedList(参考源码)
1、定义自己的MyLinkedListNode类(基本照抄了源码)namespace DataStructure{ public class MyLinkedListNode<T> { internal MyLinkedList<T> list; internal MyLinkedListNode<T> n...原创 2019-06-10 15:11:56 · 306 阅读 · 0 评论 -
C#手写简单的Stack
using System;namespace DataStructure{ public class MyStack<T> { private T[] _array; private int _size; public MyStack(int size) { _array...原创 2019-06-10 15:56:52 · 210 阅读 · 0 评论 -
C#手写简单的Queue(参考源码)
using System;namespace DataStructure{ public class MyQueue<T> { private T[] _array; private int _head; private int _tail; private int _size; ...原创 2019-07-24 19:41:44 · 140 阅读 · 0 评论