看到的一題
Given $a > 0, a\neq 1$, $\forall n \in \mathbb{N}$, we have
$$ \frac{1+a^2+a^4+\cdots + a^{2n}}{a+a^3+\cdots+a^{2n-1}} > \frac{n+1}{n} $$
…Given $a > 0, a\neq 1$, $\forall n \in \mathbb{N}$, we have
$$ \frac{1+a^2+a^4+\cdots + a^{2n}}{a+a^3+\cdots+a^{2n-1}} > \frac{n+1}{n} $$
…很久以前在 FB 上看到的這題
…求證不等式 對於實數 $x$,$\cos(\sin x) > \sin(\cos x)$
題目如下:
…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.Notice that the solution set must not contain duplicate triplets.
題目如下:
…Given the
root
of a binary tree, return an array of the largest value in each row of the tree (0-indexed).
題目如下:
…Given two arrays, write a function to compute their intersection.
題目如下:
…Write a SQL query for a report that provides the following information for each person in the Person table, regardless if there is an address for each of those people:
FirstName, LastName, City, State
題目如下:
Given two integers
dividend
anddivisor
, divide two integers without using multiplication, division and mod operator.
Return the quotient after dividing
dividend by divisor
.
The integer division should truncate toward zero, which means losing its fractional part. For example, truncate(8.345) = 8
and truncate(-2.7335) = -2
.
題目如下:
…And then read line by line:
"PAHNAPLSIIGYIR"
Write the code that will take a string and make this conversion given a number of rows:
string convert(string s, int numRows);
題目如下:
…Given a 32-bit signed integer, reverse digits of an integer.
題目如下:
…Given a string
s
, find the length of the longest substring without repeating characters.