自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 字节面试中遇到的一道代码题

题目:编写递归算法求最大重复字串,比如"aaabbcc"的最大重复字串为’aaa’,"aab"最大重复字串为‘aa’,并编写测试用例。class Solution: def repeatTimes(self, s): n = len(s) if n == 0: return None c = {} for i in range(n): if s[i] not in c.keys(): c[s[i]] = 1 else: c[s[i]] += 1 c

2021-04-20 09:29:49 297

原创 python数据结构

利用python实现单链表#!/usr/bin/env python# -*- coding: utf-8 -*-# @File : single_link_list.py# @Date : 2021/4/16class Node: """单链表的节点""" def __init__(self, data): self.data = data self.next = Noneclass SingleLinkList: """单链表

2021-04-17 19:32:11 95 2

原创 SQLZOO刷题遇到的困难

SQLZOO上的难题sqlzoo难题——self join第十题Find the routes involving two buses that can go from Craiglockhart to Lochend.Show the bus no. and company for the first bus, the name of the stop for the transfer,and the bus no. and company for the second bus.Hint:Sel

2021-03-11 16:08:58 276

原创 牛客网刷题遇到的困难

牛客网SQL12:获取所有部门中当前员工薪水最高的相关信息解析:初看本题,不假思索地写下如下答案:SELECT dept_no, s.emp_no, MAX(salary) AS maxSalary FROM salaries s, dept_emp de WHERE de.emp_no = s.emp_noGROUP BY dept_noORDER BY dept_no;但是由于salaries.emp_no是非聚合列,放在SELECT中会默认返回该列的第一个记录,导致emp_no与最大s

2021-03-04 11:26:43 277 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除