Skip to content

Leetcode/剑指offer/一些算法题目集锦

Notifications You must be signed in to change notification settings

gucoi/Leetccode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

既然来到这里 那就认真的读下去吧 放下浮躁 放下心 去认真读

请谨记 没有立即的成功 只有不懈的努力 少点功利心 多点奋斗(More interest Less interests) 勿骄勿燥 这里有go的数据结构和一些笔试常用的算法题

另外这篇笔记参考了gods的笔记模式

Leetcode/剑指offer/一些算法题目集锦

题目 所使用语言 所属网站 文件位置
二维数组查找 C++ 牛客网 二维数组查找
二叉树的坡度 C++ Leetcode 计算二叉树坡度
替换空格 C++ 牛客网 替换空格
二进制中1的个数 C++ 牛客网 二进制中1的个数
调整数组顺序 C++ 牛客网 调整数组顺序
合并两个链表 C++ 牛客网 合并两个链表
删除单向链表的节点 C++ Leetcode 删除单向链表的节点
链表中的倒数第k个节点 go&&C++ 牛客网 链表中的倒数第k个节点
二叉树镜像 C++ 牛客网 二叉树镜像
链表的反转 C++ 牛客网 链表的反转
树的子结构 C++ 牛客网 树的子结构
二叉树的后序遍历 C++ Leetcode 二叉树后序遍历
旋转图像 C++ Leetcode 旋转图像
二叉树的堂兄弟 C++ Leetcode 二叉树的堂兄弟
AVL C++ Leetcode 平衡二叉树
验证回文字符串 C++ Leetcode 验证回文字符串
寻找最短递增数列的长度 C++ leetcode 寻找最短递增数列的长度

go的一些常用的数据结构

Data Structure Implementation
lists
UseArrayList ArrayLists
UseSingleList SinglLists
UseDoubleList DoubleLists

A list where each element points to the next element in the list.

ArrayList

the implementation of mycomprator within GO\StucureTest\ArrayList\main.go

	func main() {
		list := New(3, 2, 1)
		fmt.Println(list.Size())
		list.Add(9)
		fmt.Println(list.element)
		Sort(list.element[:list.size], mycomprator)
		fmt.PrintLn(list.element)
		List.Clear()
		fmt.Println(list.element)
	}

SingleLists

    func main() {
		list := New()
		list.Add(1, 2, 3, 4)
		list.HeadAdd(9)
		list.Remove(3)
		list.Insert(10, 2)
		t, i := list.Find(2)
		if t {
			fmt.Printf("find the element in the pos %d \n", i)
		}
		list.Display()
	}

DoubleLists

The late complation

	
	func main() {
		list := New()
		list.Add(1, 2, 3, 4)

	}

About

Leetcode/剑指offer/一些算法题目集锦

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published