• 等级
  • 6239 访问
  • 49 原创
  • 8 转发
  • 108157 排名
  • 32 评论
  • 5 获赞

算法设计与分析--动态规划(十)

Scramble String 题目 Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possible representation of s1 = “great”: great / ...

2018-11-08 13:24:14

以太坊私链区块字段和交易字段的解释

Difficulty:表示当前区块的难度。 ExtraData:与此区块相关的附加数据。 gasLimit:当前区块允许使用的最大gas。 gasUsed:当前区块累计使用的gas。 Hash:区块的哈希值。如果区块没有被确认,这个字段会是null值。 LogsBloom:区块日志的布隆过滤器,区块没被确认是值为null。 Miner:取得该区块记账权的矿工。 mixHash:一个Hash值,...

2018-11-06 23:52:19

智能合约调用篇--通过地址实例化智能合约调用

通过地址实例化智能合约调用 很多时候,我们都是在刚部署好智能合约的时候就对智能合约开始调用,此时的实例可以使用部署时候的实例,但很多时候,我们需要通过地址来调用智能合约,下面我们简单说说怎么使用合约的地址对合约进行调用。 首先知道合约的地址,将合约的地址赋值给address address = "合约的地址" 然后在本地取得合约代码的abi编码 其中Token.tol用solidity语言...

2018-11-05 13:08:39

Edit Distance(动态规划)

Edit Distance 题目 Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2. You have the following 3 operations permitted on a word: Insert a character ...

2018-11-04 15:15:43

Unique Paths II(动态规划)

Unique Paths II 题目 A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below). The robot can only move either down or right at any point in time. The robot is tryi...

2018-11-04 14:28:08

Longest Valid Parentheses(动态规划)

Longest Valid Parentheses 题目 Given a string containing just the characters ‘(’ and ‘)’, find the length of the longest valid (well-formed) parentheses substring. Example 1: Input: “(()” Output: 2 Expl...

2018-11-04 13:33:37

智能合约的部署,调用以及节点的加入

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wxb880114/article/details/80742672 确保本地以安装好go-ethernum环境未安装参考:以太坊私有链入门最新教程(6.6更新)&nb...

2018-11-04 10:03:04

geth常用命令

geth常用命令 初始化私链 geth --datadir /path/to/datadir init /path/to/genesis.json 启动私链 geth --identity "TestNode" --rpc --rpcport "8545" --datadir /path/to/datadir --port "30303" --nodiscover consol 创建账户 可...

2018-11-03 14:09:11

geth建立私链以及发布第一个智能合约

geth建立私链 初始化genesis.json文件 geth --datadir data init gensis.json 启动私链 有很多可选参数 geth --datadir --verbosity 4 console 2>>detail.log 做好前期准备工作 新建好账户 personal.newAccount("123456") 挖矿获取一定的以太币用于发布自己...

2018-11-03 14:00:21

geth的安装(Linux)

基于Linux系统geth的安装 安装ethereum sudo apt-get install software-properties-common sudo add-apt-repository -y ppa:ethereum/ethereum sudo apt-get update sudo apt-get install ethereum 然后用 geth --help 检查是否安装成...

2018-11-02 17:14:25

区块链Solidity教程之文件结构(一)

版本声明 pragma solidity ^0.4.0; 表示低于这个对应版本的编译器才可以编译。 引用文件 与python引用文件一样,通过import引用文件 全局引入 import “filename”; 自定义命名空间引入 import * as symbolName from “filename” 引用同目录的使用 import “./x” as x 注释 用//或者/**/来进行...

2018-10-30 22:42:48

算法设计与分析(九)--动态规划

Burst Balloons 题目 Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloons. If the you burst balloon i yo...

2018-10-30 22:14:53

算法设计与分析--动态规划(八)

Longest Increasing Path in a Matrix 题目 Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions: left, right, up or down. You may...

2018-10-27 11:37:18

算法设计与分析(七)

贪心算法 题目 这次我们选择两题贪心算法作为练习,这两道题目是有关系的,一个是比较基础的贪心,另一个是难一点的贪心。 Jump Game Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array re...

2018-10-18 23:46:51

LeetCode--Keys and Rooms

Keys and Rooms 题目 There are N rooms and you start in room 0. Each room has a distinct number in 0, 1, 2, …, N-1, and each room may have some keys to access the next room. Formally, each room i has a ...

2018-10-14 22:20:26

算法设计与分析(六

Merge k Sorted Lists 题目 Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: Input: [ 1->4->5, 1->3->4, 2->6 ] Output: 1->1-&gt

2018-10-11 19:30:11

算法设计与分析(五)

Is Graph Bipartite? 1. 题目 Given an undirected graph, return true if and only if it is bipartite. Recall that a graph is bipartite if we can split it’s set of nodes into two independent subsets A and B...

2018-10-04 10:04:31

算法设计与分析第四周练习(图论)

Network Delay Time 1. 题目 There are N network nodes, labelled 1 to N. Given times, a list of travel times as directed edges times[i] = (u, v, w), where u is the source node, v is the target node, and ...

2018-09-28 13:54:57

3Sum

3Sum 1.题目 Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: The solution set m...

2018-09-24 23:49:16

LeetCode--Longest Common Prefix

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: ["flowe...

2018-09-24 21:08:58

VilinPlus

关注
  • 计算机软件/学生
  • 中国 广东省 广州市
奖章
  • 持之以恒