当前搜索:

Leetcode算法学习日志-144 Binary Tree Preorder Traversal

Leetcode 144 Binary Tree Preorder Traversal题目原文Given a binary tree, return the preorder traversal of its nodes' values.题意分析先根次序输出一棵树解法分析先根次序输出一棵树最常见的...
阅读(26) 评论(0)

Leetcode算法学习日志-494 Target Sum

Leetcode 494 Target Sum 题目原文 You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. Fo...
阅读(88) 评论(0)

Leetcode算法学习日志-287 Find the Duplicate Number

Leetcode 287 Find the Duplicate Number 题目原文 Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), pro...
阅读(92) 评论(0)

伪随机序列相关知识

伪随机序列相关知识 m序列是采用LFSR生成的伪随机序列,一个n级LFSR如果共有2^n-1种输出状态,全0状态除外,则它能生成一个周期为2^n-1的小m序列,同时如果只看n级移位寄存器中的状态,则总共有2^n-1种状态,可见如果将初始状态作为输入,输出为移位后的状态,则该LFSR是一个pe...
阅读(120) 评论(0)

Leetcode算法学习日志-735 Asteroid Collision

Leetcode 735 Asteroid Collision 题目原文 We are given an array asteroids of integers representing asteroids in a row. For each asteroid, the absolut...
阅读(139) 评论(0)

Leetcode算法学习日志-738 Monotone Increasing Digits

Leetcode 738 Monotone Increasing Digits 题目原文 Given a non-negative integer N, find the largest number that is less than or equal to N with monoto...
阅读(86) 评论(0)

Leetcode算法学习日志-767 Reorganize String

Leetcode 767 Reorganize String 题目原文 Given a string S, check if the letters can be rearranged so that two characters that are adjacent to each oth...
阅读(408) 评论(0)

Leetcode算法学习日志-743 Network Delay Time

Leetcode 743 Network Delay Time 题目原文 There are N network nodes, labelled 1 to N. Given times, a list of travel times as directed edges times[...
阅读(179) 评论(0)

Leetcode算法学习日志-748 Shortest Completing Word

Leetcode 748 Shortest Completing Word题目原文Find the minimum length word from a given dictionary words, which has all the letters from the string licens...
阅读(88) 评论(0)

Leetcode算法学习日志-687 Longest Univalue Path

Leetcode 687 Longest Univalue Path 题目原文 Given a binary tree, find the length of the longest path where each node in the path has the same value. ...
阅读(165) 评论(0)

Leetcode算法学习日志-686 Repeated String Match

Leetcode 686 Repeated String Match 题目原文 Given two strings A and B, find the minimum number of times A has to be repeated such that B is a sub...
阅读(140) 评论(0)

Topcoder SRM 727 TwoDiagonals

Topcoder SRM 727 TwoDiagonals 题目原文 Bearland can be represented as a horizontal plane with N distinct points, denoting positions of N cities.The i...
阅读(216) 评论(0)

Leetcode算法学习日志-486 Predict the Winner

Leetcode 486 Predict the Winner 题目原文 Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end o...
阅读(114) 评论(0)

Leetcode算法学习日志-496 Next Greater Element

Leetcode 496 Next Greater Element 题目原文 You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2...
阅读(89) 评论(0)

hiho一下183周 Counting Island II

hiho一下183周 Counting Island II 题目原文 Country H is going to carry out a huge artificial islands project. The project region is divided into a 10...
阅读(130) 评论(0)

布尔函数代数标准型的求法

布尔函数的代数标准型 布尔函数的小项表示 布尔函数的小项表示可以由真值表直接得出,最小项表示如下: 其中ai为0表示xi取反,每个最小项的系数为对应真值表的值,可知x的每个状态只能使得唯一一个最小项为1,其余都为0,注意上式中只有与、或、非三种逻辑运算,由于各个最小项不能...
阅读(240) 评论(0)

Codechef Wonder Woman and the Dark man

Codechef Wonder Woman and the Dark man 题目原文 Input The first line contains 'N' number of numbers formed by the magic cave followed by the seque...
阅读(118) 评论(0)

Leetcode算法学习日志-752 Open the Lock

Leetcode 752 Open the Lock 题目原文 You have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '...
阅读(319) 评论(0)

Leetcode算法学习日志-751 IP to CIDR

Leetcode 751 IP to CIDR 题目原文 Given a start IP address ip and a number of ips we need to cover n, return a representation of the range as a list ...
阅读(530) 评论(0)

Atcoder wide flip解题报告

Atcoder wide flip 题目原文 You are given a string S consisting of 0 and 1.Find the maximum integer K not greater than |S| such that we can turn a...
阅读(111) 评论(0)
    个人资料
    持之以恒
    等级:
    访问量: 1万+
    积分: 959
    排名: 5万+
    文章分类
    最新评论