自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 资源 (1)
  • 收藏
  • 关注

原创 [LeetCode]Maximum Depth of Binary Tree

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.首先,根据深度优先搜索的思路,用递归来做java code如下public int m

2015-05-10 20:59:11 312

原创 [LeetCode]Valid Sudoku

Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the character ‘.’. A partially filled sudoku whic

2015-05-09 15:01:38 695

原创 [LeetCode] Valid parentheses

Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.The brackets must close in the correct order, “()” and “()[]{}” are all valid but “

2015-05-04 22:15:54 303

原创 [LeetCode] Remove Linked List Elements

Remove all elements from a linked list of integers that have value val.Example Given: 1 –> 2 –> 6 –> 3 –> 4 –> 5 –> 6, val = 6 Return: 1 –> 2 –> 3 –> 4 –> 5java code/** * Definition for singly-linke

2015-05-03 22:58:06 447

原创 [LeetCode]Roman to Integer

guarantee了输入,简单好多 = = ruby code实现如下# @param {String} s# @return {Integer}def roman_to_int(s) symbols = {"I" => 1, "V" => 5, "X" => 10, "L" => 50, "C" => 100, "D" => 500, "M" => 1000} result =

2015-04-26 21:46:02 402

原创 LeetCode - StringToInteger - java

基本在submit, 修改,submit,修改……public int myAtoi(String str) { str = str.trim(); int n = str.length(); if (n == 0) return 0; char firstChar = str.charAt(0); if(firstCh

2015-04-22 15:36:35 378

原创 记录下自己拙计的算法之旅 LeetCode Rotate Array

记录下自己拙计的算法之旅LeetCode Rotate Arraydef rotate(nums, k) num_cp = nums.clone pos = k % nums.length start_pos = 0 nums.length.times do nums[pos] = num_cp[start_pos] start_pos += 1

2015-04-12 20:56:56 359

密码学SPN分组加解密

1. 实现课本 简单的SPN-分组加密和解密算法; 2. 实现对任意文件的加密和解密; 3. 测试加密函数的运行速度; 4. 对加密函数进行先行密码分析。

2014-04-13

空空如也

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

TA关注的人

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