摘要:
Given a 32-bit signed integer, reverse digits of an integer. Example 1: Example 2: Example 3: Note:Assume we are dealing with an environment which cou 阅读全文
摘要:
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 ex 阅读全文
摘要:
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. Example 1: Example 2: 阅读全文
摘要:
Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index. According 阅读全文
摘要:
Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. Example: Note: 1. 1 is typic 阅读全文
摘要:
Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements 阅读全文
摘要:
Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that support the peek() operation -- it e 阅读全文
摘要:
Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. Th 阅读全文
摘要:
记录自己在linux上搭建go环境的经历。(因为各种版本,linux系统问题挣扎了几天) 内核版本发行版本命令:cat /etc/issue Ubuntu位数:sudo uname --m 我开始使用的32位Ubuntu,所以go也下载的这个版本,结果bug了。 go代码里面使用Add64数据结构程 阅读全文
摘要:
Berkerly DB 是一种嵌入式数据库。 1.数据类型 数据库句柄结构 DB,相当于表,存储key/value对。 数据库记录结构 DBT,表示关键字、数据,即key/value。其中两个重要字段:数据值void *data,数据大小u_int32_t size 数据库游标结构 DBC,可作为遍 阅读全文