Fib(n)=Fib(n-1)+Fib(n-2);Fib1=Fib2=1; ##递归 public static int fibonacci(int n){ if (n == 1 || n == 2) { return 1; } if (n > 2) { return fibonacci(n - 1 ...
分类:
编程语言 时间:
2021-04-02 13:35:33
阅读次数:
0
解题思路: 栈是先进后出,队列是先进先出 # -*- coding:utf-8 -*- class Solution: # 初始化栈为空列表 def __init__(self): self.acceptStack=[] self.outputStack=[] def push(self, node ...
分类:
其他好文 时间:
2021-04-02 13:32:05
阅读次数:
0
官网的这篇文章不理解:https://learnku.com/docs/laravel/8.x/container/9361 大概是服务容器是个包含很多方法,类的一个东西,然后我们的代码会被放入里面执行,但是这个是怎么实现的,全文没看到有把参数传入的动作: 其实,主要靠 IOC超级工厂和PHP的 R ...
分类:
其他好文 时间:
2021-04-02 13:30:06
阅读次数:
0
【Leetcode-215】 一、题目:数组中的第k大元素 在未排序的数组中找到第 k 个最大的元素。请注意,你需要找的是数组排序后的第 k 个最大的元素,而不是第 k 个不同的元素。 二、代码: def findKthLargest(self, nums: List[int], k: int) - ...
分类:
编程语言 时间:
2021-04-02 13:24:48
阅读次数:
0
一、文本与Base64 1、文本转Base64字符串 private static string StrToBase64(string str) { byte[] b = Encoding.Default.GetBytes(str); //转成 Base64 形式的 System.String st ...
public class DistanceRad { private static double EARTH_RADIUS = 6378.137;// 单位千米 /** * 角度弧度计算公式 rad:(). <br/> * <p> * 360度=2π π=Math.PI * <p> * x度 = x ...
分类:
编程语言 时间:
2021-04-02 13:00:40
阅读次数:
0
解题思路:通过找规律,发现其实这也是斐波那契数列 # -*- coding:utf-8 -*- class Solution: def jumpFloor(self, number): #n=1 f(n)=1 #n=2,11,2, f(n)=2 #n=3,111,12,21 f(n)=3 #n=4, ...
分类:
其他好文 时间:
2021-04-02 13:00:23
阅读次数:
0
源码工厂分享全网最全的商业源码、主题模板、模块插件、免费源码、php源码、asp.net源码、jsp源码、站长源码、论坛源码下载以及VIP源码、音视频教程,营销工具等,各类建站资源一应俱全的免费源码下载分享社区,优秀的建站资源尽在源码工厂 源码工厂:https://www.ahf168.com ...
分类:
Web程序 时间:
2021-04-02 12:57:35
阅读次数:
0
# 需要修改oracle的配置数据库 import cx_Oracle from Common.dir_config import caps_dir import yaml class DoSql: def do_orcal(self,query_sql,state='all'): # 1打开yam ...
分类:
数据库 时间:
2021-04-01 13:48:10
阅读次数:
0
/* * 接口的使用 * 1.接口使用上也满足多态性 * 2.接口,实际上就是定义了一种规范 * 3.开发中,体会面向接口编程! */ public class USBTest { public static void main(String[] args) { Computer com = new ...
分类:
其他好文 时间:
2021-04-01 13:43:59
阅读次数:
0