• 为了保证你在浏览本网站时有着更好的体验,建议使用类似Chrome、Firefox之类的浏览器~~
    • 如果你喜欢本站的内容何不Ctrl+D收藏一下呢,与大家一起分享各种编程知识~
    • 本网站研究机器学习、计算机视觉、模式识别~当然不局限于此,生命在于折腾,何不年轻时多折腾一下

快速排序-模拟堆栈

这题也是博主最近面试中遇到的一题,这个面试大厂还是要好好刷题的,面试过程写了 native 版本,但是也要学会这一点# -*- coding: utf-8 -*-# @Time : 2019/3/11 下午 3:22# @Author : zhusimaji# @File : qsort_by_for.py# @Softwar……

100. Same Tree

Given two binary trees, write a function to check if they are the same or not.Two binary trees are considered the same if they are structurally identical and the nodes have the……

88. Merge Sorted Array

Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1as one sorted array.Note:The number of elements initialized in nums1 and nums2 are m and nrespectively.Yo……

83. Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element appear only once.Example 1:Input: 1->1->2Output: 1->2Example 2:Input: 1->1->2->……

67. Add Binary

Given two binary strings, return their sum (also a binary string).The input strings are both non-empty and contains only characters 1 or 0.Example 1:Input: a = "11", b = "1"……

58. Length of Last Word

Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not exist, return 0……

53. Maximum Subarray

Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.Example:Input: [-2,1,-3,4,-1,2,1,-5,4],……

38. Count and Say

The count-and-say sequence is the sequence of integers with the first five terms as following:1. 12. 113. 214. 12115. 1112211 is read off as "one……

35. Search Insert Position(Easy)

Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no du……

28. Implement strStr()

Implement strStr().Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Example 1:Input: haystack = "hello", needle = "ll"……

26. Remove Duplicates from Sorted Array

Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for another array, you m……

21. Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Example:Input: 1->2->4, 1-……

20. Valid Parentheses

Given a string containing just the characters '(', ')', '{', '}', '['and ']', determine if the input string is valid.An input string is valid if:Open brackets must be closed ……

14. Longest Common Prefix

Write a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string "".Example 1:Input: ["flower","flow"……

six兼容库

tensorflow 最近开源了 TF-RANKING,看代码的时候发现反复使用了 six 库,说实话一直在用 python3,基本上没有考虑过兼容性的问题,顺便学习一下,需要学习的东西还很多,加油吧!本文转载而来。SIX 是用于 python2 与 python3 兼容的库。它存在的目的是为了拥有无需修改即可在 Python 2 和 Python ……

tornado+apscheduler定时任务

好久没有更新了,工作忙网站都长草了,最近这两天搞一个调度任务,定时从 HIVE 抽数,使用 tornado 写个服务实现类似的功能。使用自带的间隔回调函数在发送请求没办法达到异步的效果,但是也不想在外部设置 cron 热痱任务,最后的目的就是将这些柔到一个代码里面,所以才有了这篇文章,下面给出的是示例使用 apscheduler 定时任务,可以使用 i……

Item2安装SZ和RZ问题

Item2安装SZ和RZ问题

安装 brewbrew是 Mac OS 上的一个包管理工具,可以使用它来安装接下来要使用到的 iTerm,wget 等工具。Mac 默认安装了 ruby,打开终端执行如下命令:/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/mast……

Xgbfi特征重要性分析(xgboost扩展)

Xgbfi特征重要性分析(xgboost扩展)

Xgbfi用于训练好的 xgboost 模型分析对应特征的重要性,当然你也可以使用 fmap 来观察What is Xgbfi?Xgbfi is a XGBoost model dump parser, which ranks features as well as feature interactions by different metrics.……