Python面试共10篇

python面试之python去除链表重复项

python去除链表重复项 class Node: def init(self,data=None): self.data=data self.next=None class ListNode: def init(self): self.head=Node() def append(self,num): node=Node(num) ...
程序员吾非同的头像-程序员知识精选xinlong1321年前
02100

python面试之判断链表是否有环

判断链表是否有环 class Node: def __init__(self,data=None): self.data=data self.next=None class ListNode: def __init__(self): self.head=Node() ...
程序员吾非同的头像-程序员知识精选xinlong1321年前
02140

python面试之查找链表倒数第K个元素

python查找链表倒数第K个元素 class Node: def __init__(self,data=None): self.data=data self.next=None class ListNode: def __init__(self): self.head=N...
程序员吾非同的头像-程序员知识精选xinlong1321年前
02260

Python常见基础问答题

Python常见基础问答题 1.TCP和UDP的区别 TCP提供的是⾯向连接的、可靠的数据流传输。UDP提供的是⾮⾯向连接的、不可靠的数据流传输。 TCP提供可靠的服务,通过TCP连接传送的数据,⽆差错、不丢...

机器学习笔试题30题

1. 在回归模型中,下列哪一项在权衡欠拟合( under-fitting)和过拟合( over-fitting)中影响最大? A. 多项式阶数 B. 更新权重 w 时,使用的是矩阵求逆还是梯度下降 C. 使用常数项 答案...

Python面试之python实现二叉树代码

Python实现二叉树代码 class TreeNode: def __init__(self,data=None): self.data=data self.left=None self.right=None #[1,2,3,4,5,6] def arr_to_tree(low,hig...
程序员吾非同的头像-程序员知识精选xinlong1321年前
02150

python面试之python二分法查找数据

python二分法查找数据 array=[1,2,3,4,5,6,7,8,9,100] def searchNum(low,high,findNum): mid=(low+high)//2 if findNum>array[mid]: low=mid+1 elif findNum<array...
程序员吾非同的头像-程序员知识精选xinlong1321年前
02000

python面试之python实现链表反转

python实现链表反转 class Node: def __init__(self,data=None): self.data=data self.next=None class ListNode: def __init__(self): self.head=Node() ...
程序员吾非同的头像-程序员知识精选xinlong1321年前
02140