自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Python基础入门学习笔记

一、 print()函数与变量print()函数前提:全部用英文输入法输入!!!!!print(): 括号里加'',也可用双引号“”,输出字符串,如print(‘1+1’)输出1+1,print(1+1)输出2,print('我')输出我转义字符print():括号内容包含''时,需区分,可用“”,或\'print(): 括号内容需分...

2019-09-18 22:23:15 2136

原创 利用Python做一个简单的对战小游戏

利用Python做一个简单的文字对战小游戏一、游戏介绍 1、大体介绍:文字版的对战小游戏,可以利用Python随机生成两个角色,角色带有各自的血量和攻击值两个指标。两人在对战时同时攻击对方,同时造成与攻击值相等的伤害。最终一方血量降到0以下的为输。 2、拆解项目 ①ver1.0...

2019-09-08 04:30:55 8452

原创 【中国大数据算法大赛】基于移动网络通讯行为的风险用户识别

【中国大数据算法大赛】基于移动网络通讯行为的风险用户识别比赛内容评分算法比赛按如下公式计算得分:score = 0.6 × auc + 0.4 × F1其中:auc值为在测试集上,根据预测结果按照标准auc定义计算的分值;F1值为针对测试集中实际标签为1(风险用户)的用户,根据预测结果,按照标准F-measure定义计算的分值。1.数据来源和使用说明提供45个连续自然...

2018-12-24 23:40:42 1925 1

原创 【LeetCode】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 same value.E...

2018-12-10 20:56:27 122

原创 【LeetCode】Find All Anagrams in a String

题目描述:Given a string s and a non-empty string p, find all the start indices of p's anagrams in s.Strings consists of lowercase English letters only and the length of both strings s and p will not b...

2018-12-02 23:33:26 115

原创 【LeetCode】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 1" or 11.11 is read o...

2018-11-30 16:41:10 84

原创 【LeetCode】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","flight"]Output:...

2018-11-20 01:18:04 68

原创 【LeetCode】goat Latin

题目描述:A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters only.We would like to convert the sentence to "Goat Latin" (a made-up langu...

2018-11-14 23:26:46 160

原创 【Leetcode】maximum binary tree

Given an integer array with no duplicates. A maximum tree building on this array is defined as follow:The root is the maximum number in the array. The left subtree is the maximum tree constructed f...

2018-11-04 10:55:54 69

原创 【LeetCode】range-sum-query-immutable

题目描述:Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.Example:Given nums = [-2, 0, 3, -5, 2, -1]sumRange(0, 2) -> 1sumRange(2, 5) ->...

2018-10-27 20:16:43 65

原创 【Leetcode】minimum-depth-of-binary-tree

题目描述:Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.Note: A leaf is a node with no ...

2018-10-23 14:58:59 130

原创 Max Increase to Keep City Skyline

In a 2 dimensional array grid, each value grid[i][j] represents the height of a building located there. We are allowed to increase the height of any number of buildings, by any amount (the amounts can...

2018-10-14 21:08:03 88

原创 【Leetcode】Merge Two Binary Trees

题目:Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.You need to merge them into a new binary...

2018-10-08 02:00:48 79

原创 【Leetcode】To Lower Case

题目大意:把所有的大写字母转化为小写字母解题方法:判断字符是否在‘A’-‘Z’中,如果是,则转换为小写,如果不是,保留不变既可Python解法:class Solution(object): def toLowerCase(self, str): """ :type str: str :rtype: str ""...

2018-10-07 21:54:51 98

原创 【leetcode】Jewels and Stones

珠宝和石头的问题属于简单的字符串问题解题思路:由于珠宝中的各个字符是独立不重复的因此只需要在遍历石头中的各个字符并进行匹配计数即可代码如下:class Solution {public: int numJewelsInStones(string J, string S) { int count = 0; for (int i = 0; i <...

2018-09-23 10:39:02 329

原创 LeetCode算法入门(Reverse numbers)

Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Note:Assume we are dea...

2018-09-17 16:39:55 98

原创 【LeetCode】算法入门(Two Sum)

Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the same ...

2018-09-08 01:59:00 347

原创 博客网址测试

1、这是一篇测试博客2、这不是要上交的作业int main(){ print(“Hello World!”); return 0;} 

2018-09-06 22:06:39 104

空空如也

空空如也

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

TA关注的人

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