代码编织梦想

【leetcode】解题日记(未完待续)-爱代码爱编程

开坑,有生之年系列,希望有一天能解出 l e e t c

【网易2017实习生编程题】分饼干-爱代码爱编程

【Problem 12】分饼干 介绍 易老师购买了一盒饼干,盒子中一共有k块饼干,但是数字k有些数位变得模糊了,看不清楚数字具体是多少了。易老师需要你帮忙把这k块饼干平分给n个小朋友,易老师保证这盒饼干能平分给n个小朋友

【网易2017实习生编程题】 工作安排 集合 奇怪的表达式求值 涂棋盘 小易记单词-爱代码爱编程

【Problem 6】工作安排 介绍 现在有n位工程师和6项工作(编号为0至5),现在给出每个人能够胜任的工作序号表(用一个字符串表示,比如:045,表示某位工程师能够胜任0号,4号,5号工作)。现在需要进行工作安排,每

【网易2017实习生编程题】赶去公司 调整队形 消除重复元素-爱代码爱编程

【Problem 2】赶去公司 介绍 终于到周末啦!小易走在市区的街道上准备找朋友聚会,突然服务器发来警报,小易需要立即回公司修复这个紧急bug。假设市区是一个无限大的区域,每条街道假设坐标是(X,Y),小易当前在(0,

使用openssl库进行aes算法的加密-爱代码爱编程

使用openssl库进行AES算法的加密 介绍 最近维护一个插件,需要添加一个小的功能,希望能够对用户的密码进行加密保存到文件中,然后再从文件中提取出加密后的数据,并进行解密。 功能很简单,目前也有着许多的开源库包含了

[网易2017实习生编程题] 魔力手环-爱代码爱编程

【Problem 5】分饼干 题目 小易拥有一个拥有魔力的手环上面有n个数字(构成一个环),当这个魔力手环每次使用魔力的时候就会发生一种奇特的变化:每个数字会变成自己跟后面一个数字的和(最后一个数字的后面一个数字是第一个

【网易2017实习生编程题】双核处理-爱代码爱编程

【Problem 1】双核处理 题目 一种双核CPU的两个核能够同时的处理任务,现在有n个已知数据量的任务需要交给CPU处理,假设已知CPU的每个核1秒可以处理1kb,每个核同时只能处理一项任务。n个任务可以按照任意顺序

【leetcode】13. roman to integer && 12. integer to roman-爱代码爱编程

13. Roman to Integer 介绍 Given a roman numeral, convert it to an integer. Input is guaranteed to be within the

【leetcode】6. zigzag conversion-爱代码爱编程

6. ZigZag Conversion 介绍 The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows l

【leetcode】128. longest consecutive sequence-爱代码爱编程

128. Longest Consecutive Sequence 介绍 Given an unsorted array of integers, find the length of the longest conse

【leetcode】5. longest palindromic substring-爱代码爱编程

5. Longest Palindromic Substring 介绍 Given a string s, find the longest palindromic substring in s. You may ass

【leetcode】567. permutation in string-爱代码爱编程

567. Permutation in String 介绍 Given two strings s1 and s2, write a function to return true if s2 contains the

【leetcode】remove duplicates from sorted list系列-爱代码爱编程

83. Remove Duplicates from Sorted List 介绍 Given a sorted linked list, delete all duplicates such that each ele

【leetcode】61. rotate list-爱代码爱编程

61. Rotate List 介绍 Given a list, rotate the list to the right by k places, where k is non-negative. For examp

【leetcode】 84. largest rectangle in histogram-爱代码爱编程

84. Largest Rectangle in Histogram 介绍 Given n non-negative integers representing the histogram’s bar height wh

【leetcode】4. median of two sorted arrays-爱代码爱编程

4. Median of Two Sorted Arrays 介绍 There are two sorted arrays nums1 and nums2 of size m and n respectively. F

【leetcode】maximum subarray 和 maximum product subarray-爱代码爱编程

Maximum Subarray 和 Maximum Product Subarray 53. Maximum Subarray 介绍 Find the contiguous subarray within an ar

【leetcode】 majority element 系列-爱代码爱编程

Majority Element 系列 169. Majority Element 介绍 Given an array of size n, find the majority element. The majorit

【leetcode】120. triangle-爱代码爱编程

120. Triangle 介绍 Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adj

【leetcode】insert delete getrandom o(1) 系列-爱代码爱编程

Insert Delete GetRandom O(1) 系列 380. Insert Delete GetRandom O(1) 介绍 Design a data structure that supports al