The Starry Night

The Starry Night, June 1889. Museum of Modern Art, New York

by Anne Sexton

That does not keep me from having a terrible need of—shall I say the word—religion. Then I go out at night to paint the stars.Vincent Van Gogh in a letter to his brother

The town does not exist
except where one black-haired tree slips
up like a drowned woman into the hot sky.
The town is silent. The night boils with eleven stars.
Oh starry starry night! This is how
I want to die.

It moves. They are all alive.
Even the moon bulges in its orange irons
to push children, like a god, from its eye.
The old unseen serpent swallows up the stars.
Oh starry starry night! This is how
I want to die:

into that rushing beast of the night,
sucked up by that great dragon, to split
from my life with no flag,
no belly,
no cry.

One of the most remarkable aspects of the human brain is its ability to recognize patterns and describe them. Among the hardest patterns we’ve tried to understand is the concept of turbulent flow in fluid dynamics. The German physicist Werner Heisenberg said, “When I meet God, I’m going to ask him two questions: why relativity and why turbulence? I really believe he will have an answer for the first.”

As difficult as turbulence is to understand mathematically, we can use art to depict the way it looks. In June 1889, Vincent van Gogh painted the view just before sunrise from the window of his room at the Saint-Paul-de-Mausole asylum in Saint-Rémy-de-Provence, where he’d admitted himself after mutilating his own ear in a psychotic episode. In “The Starry Night,” his circular brushstrokes create a night sky filled with swirling clouds and eddies of stars. Van Gogh and other Impressionists represented light in a different way than their predecessors, seeming to capture its motion, for instance, across sun-dappled waters, or here in star light that twinkles and melts through milky waves of blue night sky. The effect is caused by luminance, the intensity of the light in the colors on the canvas. The more primitive part of our visual cortex, which sees light contrast and motion, but not color, will blend two differently colored areas together if they have the same luminance. But our brains’ primate subdivision will see the contrasting colors without blending. With these two interpretations happening at once, the light in many Impressionist works seems to pulse, flicker and radiate oddly. That’s how this and other Impressionist works use quickly executed prominent brushstrokes to capture something strikingly real about how light moves.

Sixty years later, Russian mathematician Andrey Kolmogorov furthered our mathematical understanding of turbulence when he proposed that energy in a turbulent fluid at length R varies in proportion to the 5/3rds power of R. Experimental measurements show Kolmogorov was remarkably close to the way turbulent flow works, although a complete description of turbulence remains one of the unsolved problems in physics. A turbulent flow is self-similar if there is an energy cascade. In other words, big eddies transfer their energy to smaller eddies, which do likewise at other scales. Examples of this include Jupiter’s Great Red Spot, cloud formations and interstellar dust particles.

In 2004, using the Hubble Space Telescope, scientists saw the eddies of a distant cloud of dust and gas around a star, and it reminded them of Van Gogh’s “Starry Night.” This motivated scientists from Mexico, Spain and England to study the luminance in Van Gogh’s paintings in detail. They discovered that there is a distinct pattern of turbulent fluid structures close to Kolmogorov’s equation hidden in many of Van Gogh’s paintings.
The researchers digitized the paintings, and measured how brightness varies between any two pixels. From the curves measured for pixel separations, they concluded that paintings from Van Gogh’s period of psychotic agitation behave remarkably similar to fluid turbulence. His self-portrait with a pipe, from a calmer period in Van Gogh’s life, showed no sign of this correspondence. And neither did other artists’ work that seemed equally turbulent at first glance, like Munch’s “The Scream.”

While it’s too easy to say Van Gogh’s turbulent genius enabled him to depict turbulence, it’s also far too difficult to accurately express the rousing beauty of the fact that in a period of intense suffering, Van Gogh was somehow able to perceive and represent one of the most supremely difficult concepts nature has ever brought before mankind, and to unite his unique mind’s eye with the deepest mysteries of movement, fluid and light.


Auguries of Innocence

by William Blake

To see a World in a Grain of Sand
And a Heaven in a Wild Flower
Hold Infinity in the palm of your hand
And Eternity in an hour
A Robin Red breast in a Cage
Puts all Heaven in a Rage
A Dove house filld with Doves & Pigeons
Shudders Hell thr’ all its regions
A dog starvd at his Masters Gate
Predicts the ruin of the State
A Horse misusd upon the Road
Calls to Heaven for Human blood
Each outcry of the hunted Hare
A fibre from the Brain does tear
A Skylark wounded in the wing
A Cherubim does cease to sing
The Game Cock clipd & armd for fight
Does the Rising Sun affright
Every Wolfs & Lions howl
Raises from Hell a Human Soul
The wild deer, wandring here & there
Keeps the Human Soul from Care
The Lamb misusd breeds Public Strife
And yet forgives the Butchers knife
The Bat that flits at close of Eve
Has left the Brain that wont Believe
The Owl that calls upon the Night
Speaks the Unbelievers fright
He who shall hurt the little Wren
Shall never be belovd by Men
He who the Ox to wrath has movd
Shall never be by Woman lovd
The wanton Boy that kills the Fly
Shall feel the Spiders enmity
He who torments the Chafers Sprite
Weaves a Bower in endless Night
The Catterpiller on the Leaf
Repeats to thee thy Mothers grief
Kill not the Moth nor Butterfly
For the Last Judgment draweth nigh
He who shall train the Horse to War
Shall never pass the Polar Bar
The Beggars Dog & Widows Cat
Feed them & thou wilt grow fat
The Gnat that sings his Summers Song
Poison gets from Slanders tongue
The poison of the Snake & Newt
Is the sweat of Envys Foot
The poison of the Honey Bee
Is the Artists Jealousy
The Princes Robes & Beggars Rags
Are Toadstools on the Misers Bags
A Truth thats told with bad intent
Beats all the Lies you can invent
It is right it should be so
Man was made for Joy & Woe
And when this we rightly know
Thro the World we safely go
Joy & Woe are woven fine
A Clothing for the soul divine
Under every grief & pine
Runs a joy with silken twine
The Babe is more than swadling Bands
Throughout all these Human Lands
Tools were made & Born were hands
Every Farmer Understands
Every Tear from Every Eye
Becomes a Babe in Eternity
This is caught by Females bright
And returnd to its own delight
The Bleat the Bark Bellow & Roar
Are Waves that Beat on Heavens Shore
The Babe that weeps the Rod beneath
Writes Revenge in realms of Death
The Beggars Rags fluttering in Air
Does to Rags the Heavens tear
The Soldier armd with Sword & Gun
Palsied strikes the Summers Sun
The poor Mans Farthing is worth more
Than all the Gold on Africs Shore
One Mite wrung from the Labrers hands
Shall buy & sell the Misers Lands
Or if protected from on high
Does that whole Nation sell & buy
He who mocks the Infants Faith
Shall be mockd in Age & Death
He who shall teach the Child to Doubt
The rotting Grave shall neer get out
He who respects the Infants faith
Triumphs over Hell & Death
The Childs Toys & the Old Mans Reasons
Are the Fruits of the Two seasons
The Questioner who sits so sly
Shall never know how to Reply
He who replies to words of Doubt
Doth put the Light of Knowledge out
The Strongest Poison ever known
Came from Caesars Laurel Crown
Nought can Deform the Human Race
Like to the Armours iron brace
When Gold & Gems adorn the Plow
To peaceful Arts shall Envy Bow
A Riddle or the Crickets Cry
Is to Doubt a fit Reply
The Emmets Inch & Eagles Mile
Make Lame Philosophy to smile
He who Doubts from what he sees
Will neer Believe do what you Please
If the Sun & Moon should Doubt
Theyd immediately Go out
To be in a Passion you Good may Do
But no Good if a Passion is in you
The Whore & Gambler by the State
Licencd build that Nations Fate
The Harlots cry from Street to Street
Shall weave Old Englands winding Sheet
The Winners Shout the Losers Curse
Dance before dead Englands Hearse
Every Night & every Morn
Some to Misery are Born
Every Morn and every Night
Some are Born to sweet delight
Some are Born to sweet delight
Some are Born to Endless Night
We are led to Believe a Lie
When we see not Thro the Eye
Which was Born in a Night to perish in a Night
When the Soul Slept in Beams of Light
God Appears & God is Light
To those poor Souls who dwell in Night
But does a Human Form Display
To those who Dwell in Realms of day


LeetCode - Algorithms - 162. Find Peak Element

Problem

162. Find Peak Element

Java

eager approach - O(n)

1
2
3
4
5
6
7
8
9
10
11
class Solution {
public int findPeakElement(int[] nums) {
final int len = nums.length;
for (int i = 1; i < len - 1; i++) {
if (nums[i] > nums[i - 1] && nums[i] > nums[i + 1]) {
return i;
}
}
return nums[0] < nums[len - 1] ? len - 1 : 0;
}
}

Submission Detail

  • 63 / 63 test cases passed.
  • Runtime: 0 ms, faster than 100.00% of Java online submissions for Find Peak Element.
  • Memory Usage: 41.3 MB, less than 66.17% of Java online submissions for Find Peak Element.

JavaScript

eager approach

1
2
3
4
5
6
7
8
9
10
11
12
13
/**
* @param {number[]} nums
* @return {number}
*/
var findPeakElement = function(nums) {
const len = nums.length;
for (let i = 1; i < len - 1; i++) {
if (nums[i] > nums[i - 1] && nums[i] > nums[i + 1]) {
return i;
}
}
return nums[0] < nums[len - 1] ? len - 1 : 0;
};

Submission Detail

  • 63 / 63 test cases passed.
  • Runtime: 123 ms, faster than 5.43% of JavaScript online submissions for Find Peak Element.
  • Memory Usage: 42 MB, less than 73.96% of JavaScript online submissions for Find Peak Element.

My English Words List - March - 2022

granola

granola

noun

Closeup of a granola bar showing the detail of its pressed shape

  • a mixture typically of rolled oats and various added ingredients (such as brown sugar, raisins, coconut, and nuts) that is eaten especially for breakfast or as a snack

granola bar

Granola

almond

almond

noun

Almond in shell, shell cracked open, unshelled and blanched seed

Almond

burrito

burrito

noun

A basic burrito that has not been fully wrapped, with meat, refried beans, sauce and cheese

  • a flour tortilla rolled or folded around a filling (as of meat, beans, and cheese)

Burrito

casserole

casserole

noun

Macaroni casserole with cheese topping

Vegetable casserole

I made tuna casserole for dinner.

meat and noodles served in a casserole

Casserole

artichoke

artichoke

noun

Artichokes for sale

Artichoke

slab

slab

noun

a slab of stone

Suspended slab under construction, with the formwork still in place

Concrete slab

Floor with slabs in a street of Pompeia

Stone slab

sanction

sanction

noun

Countries around the world are imposing fresh sanctions against Russia over its invasion of Ukraine.

What sanctions are being imposed on Russia?

crisp

crisp

adjective

  • notably sharp, clean-cut, and clear

a crisp illustration

  • concise and to the point

a crisp reply

crumple

crumple

verb

She crumpled the piece of paper into a ball and tossed it into the garbage can.

The car’s fender was crumpled in the accident.

taco

taco

noun

  • a corn tortilla usually folded and fried and filled with a spicy mixture (as of ground meat and cheese)

Three varieties of taco

Taco

albatross

albatross

noun

Albatrosses range over huge areas of ocean and regularly circle the globe.

Albatross

kiosk

kiosk

noun

Payment kiosk

a museum with interactive kiosks

You can pick up your plane tickets at one of the airport’s kiosks.

Interactive kiosk

compass

compass

noun

A simple dry magnetic portable compass

Compass

A compass with an extension accessory for larger circles

Compass &#40;drawing tool&#41;

prance

prance

verb

horses prancing

She pranced around in her new dress.

blaze

blaze

noun

a blaze of color

the blaze of the sun

paycheck

paycheck

noun

I went to the office to pick up my paycheck.

Your weekly paycheck will be almost $600 after taxes.

Paycheck

As inflation heats up, 64% of Americans are now living paycheck to paycheck

straw

straw

noun

  • a tube (as of paper, plastic, or glass) for sucking up a beverage
  • a slender tube for sucking up a beverage

She drank the juice through a straw.

Plastic drinking straws with bellows segment

Drinking straw

clipboard

clipboard

noun

  • a small writing board with a clip at the top for holding papers

A wooden clipboard

Clipboard

  • a section of computer memory that temporarily stores data (such as text or a graphics image) especially to facilitate its movement or duplication

Copy the sentence to the clipboard and paste it in a new document.

Clipboard &#40;computing&#41;

denim

denim

noun

Denim fabric dyed with indigo

He’s wearing faded denims and cowboy boots.

Denim

equinox

equinox

noun

March equinox

Spring equinox

Illumination of Earth by the Sun at the equinox

agenda

agenda

noun

  • a list of things to be done or talked about

There are several items on the agenda for tonight’s meeting.

What’s the first item on the agenda?

Agenda &#40;meeting&#41;

The inaccessibility of modern mathematics

by Keith Devlin

November 2002

In late October, my new book The Millennium Problems: The Seven Greatest Unsolved Mathematical Puzzles of Our Time went on sale across the country, and this month sees me doing the usual round of public lectures, bookstore talks, and magazine, radio and TV interviews that these days accompany the publication of any new book the publisher thinks has even the ghost of a chance of becoming the next popular science bestseller.

Of all the books I have written for a general audience, this latest one presented by far the greatest challenge in trying to make it as accessible as possible to non-mathematicians. The seven unsolved problems I discuss – the Clay Millennium Problems – were chosen by a small, stellar, international committee of leading mathematicians appointed by the Clay Mathematics Institute, which offers a cash prize of $1 million to the first person to solve any one of the problems. The committee’s mission was to select the most difficult and most significant unsolved problems at the end of the second millennium, problems that had for many years resisted the efforts of some of the world’s greatest mathematicians to find a solution.

No one who is at all familiar with modern mathematics will be surprised to find that none of the seven problems chosen is likely to be solved by elementary methods, and even the statement of most of the problems cannot be fully understood by anyone who has not completed a mathematics major at a university.

In writing the book, I had to ignore the oft-repeated assertion that every mathematical formula you put in a book decreases the sales by 50%. (Personally, I don’t think this is literally true, but I do believe that having pages of formulas does put off a lot of potential readers.) Although my book is mostly prose, there are formulas, and some chapters have technical appendices that are little else but formulas.

Now, as I gear up for the promotional campaign, I face the same challenge again. With the book, I think I found a way to present the story of the Millennium Problems in 250 pages of text. But what can I say about the book’s contents in a twenty minutes talk in a bookstore or a ten minute interview on a radio talk show? Thinking about this made me reflect once more about the nature of modern mathematics. Put simply: Why are the Millennium Problems so hard to understand?

Imagine for a moment that Landon Clay – the wealthy mutual fund magnate who founded the Clay Institute and provided the $7 million of prize money for the seven problems – had chosen to establish his prize competition not for mathematics but for some other science, say physics, or chemistry, or biology. It surely would not have taken an entire book to explain to an interested lay audience the seven major problems in one of those disciplines. A three or four page expository article in Scientific American or 1,500 words in New Scientist would probably suffice. Indeed, when the Nobel Prizes are awarded each year, newspapers and magazines frequently manage to convey the gist of the prize-winning research in a few paragraphs. In general you can’t do that with mathematics. Mathematics is different. But how?

Part of the answer can be found in an observation first made (I believe) by the American mathematician Ronald Graham, who for most of his career was the head of mathematical research at AT&T Bell Laboratories. According to Graham, a mathematician is the only scientist who can legitimately claim: “I lie down on the couch, close my eyes, and work.”

Mathematics is almost entirely cerebral – the actual work is done not in a laboratory or an office or a factory, but in the head. Of course, that head is attached to a body which might well be in an office – or on a couch – but the mathematics itself goes on in the brain, without any direct connection to something in the physical world. This is not to imply that other scientists don’t do mental work. But in physics or chemistry or biology, the object of the scientist’s thought is generally some phenomenon in the physical world. Although you and I cannot get inside the scientist’s mind and experience her thoughts, we do live in the same world, and that provides the key connection, an initial basis for the scientist to explain her thoughts to us. Even in the case of physicists trying to understand quarks or biologists grappling with DNA, although we have no everyday experience of those objects, even a nonscientifically trained mind has no trouble thinking about them. In a deep sense, the typical artist’s renderings of quarks as clusters of colored billiard balls and DNA as a spiral staircase might well be (in fact are) “wrong,” but as mental pictures that enable us to visualize the science they work just fine.

Mathematics does not have this. Even when it is possible to draw a picture, more often than not the illustration is likely to mislead as much as it helps, which leaves the expositor having to make up with words what is lacking or misleading in the picture. But how can the nonmathematical reader understand those words, when they in turn don’t link to anything in everyday experience?

Even for the committed spectator of mathematics, this task is getting harder as the subject grows more and more abstract and the objects the mathematician discusses become further and further removed from the everyday world. Indeed, for some contemporary problems, such as the Hodge Conjecture – one of the seven Millennium Problems – we may have already reached the point where the outsider simply can’t make the connection. It’s not that the human mind requires time to come to terms with new levels of abstraction. That’s always been the case. Rather, the degree and the pace of abstraction may have finally reached a stage where only the expert can keep up.

Two and a half thousand years ago, a young follower of Pythagoras proved that the square root of 2 is not a rational number, that is, cannot be expressed as a fraction. This meant that what they took to be the numbers (the whole numbers and the fractions) were not adequate to measure the length of the hypotenuse of a right triangle with width and height both equal to 1 unit (which Pythagoras’ theorem says will have length the square root of 2). This discovery came as such a shock to the Pythagoreans that their progress in mathematics came to a virtual halt. Eventually, mathematicians found a way out of the dilemma, by changing their conception of what a number is to what we nowadays call the real numbers.

To the Greeks, numbers began with counting (the natural numbers) and in order to measure lengths you extended them to a richer system (the rational numbers) by declaring that the result of dividing one natural number by another was itself a number. The discovery that the rational numbers were not in fact adequate for measuring lengths led later mathematicians to abandon this picture, and instead declare that numbers simply are the points on a line! This was a major change, and it took two thousand years for all the details to be worked out. Only toward the end of the nineteenth century did mathematicians finally work out a rigorous theory of the real numbers. Even today, despite the simple picture of the real numbers as the points on a line, university students of mathematics always have trouble grasping the formal (and highly abstract) development of the real numbers.

Numbers less than zero presented another struggle. These days we think of negative numbers as simply the points on the number line that lie to the left of 0, but mathematicians resisted their introduction until the end of the seventeenth century. Similarly, most people have difficulty coming to terms with complex numbers – numbers that involve the square root of negative quantities – even though there is a simple intuitive picture of the complex numbers as the points in a two-dimensional plane.

These days, even many nonmathematicians feel comfortable using real numbers, complex numbers, and negative numbers. That is despite the fact that these are highly abstract concepts that bear little relationship with counting, the process with which numbers began some ten thousand years ago, and even though, in our everyday lives, we never encounter a concrete example of an irrational real number or a number involving the square root of -1.

Similarly in geometry, the discovery in the eighteenth century that there were other geometries besides the one that Euclid had described in his famous book Elements caused both the experts and the nonmathematicians enormous conceptual problems. Only during the nineteenth century did the idea of “non-Euclidean geometries“ gain widespread acceptance. That acceptance came even though the world of our immediate, everyday experience is entirely Euclidean.

With each new conceptual leap, even mathematicians need time to come to terms with the new ideas, to accept them as part of the overall background against which they do their work. Until recently, the pace of progress in mathematics was such that, by and large, the interested observer could catch up with one new advance before the next one came along. But it has been getting steadily harder. To understand what the Riemann Hypothesis says, the first problem on the Millennium list, you need to have understood, and feel comfortable with, not only complex numbers (and their arithmetic) but also advanced calculus, and what it means to add together infinitely many (complex) numbers and to multiply together infinitely many (complex) numbers.

Now that kind of knowledge is restricted almost entirely to people who have majored in mathematics at university. Only they are in a position to see the Riemann Hypothesis as a simple statement, not significantly different from the way an average person views Pythagoras’ theorem. My task in writing my book, then, was not only to explain what the Riemann Hypothesis says but to provide all of the preliminary material as well. Clearly, I cannot do that in a ten minute radio interview!

The root of the problem is that, in most cases, the preparatory material cannot be explained in terms of everyday phenomena, the way that physicists, for example, can explain the latest, deepest, cutting-edge theory of the universe – Superstring Theory – in terms of the intuitively simple picture of tiny, vibrating loops of energy (the “strings” of the theory).

Most mathematical concepts are built up not from everyday phenomena but from earlier mathematical concepts. That means that the only route to getting even a superficial understanding of those concepts is to follow the entire chain of abstractions that leads to them. My readers will decide how well I succeed in the book. But that avenue is not available to me in a short talk.

Perhaps, then, instead of trying to describe the Millennium Problems themselves, I’ll tell my audiences why they are so hard to understand. I’ll explain that the concepts involved in the Millennium Problems are not so much inherently difficult – for they are not – as they are very, very unfamiliar. Much as the idea of complex numbers or non-Euclidean geometries would have seemed incomprehensibly strange to the ancient Greeks. Today, having grown familiar with these ideas, we can see how they grow naturally out of concepts the Greeks knew as commonplace mathematics.

Perhaps the best way to approach the Millennium Problems, I will say, is to think of the seven problems as the commonplace mathematics of the 25th century.

And maybe that will turn out to be the case.


The high-stakes race to make quantum computers work - Chiara Decaroli - TED-Ed - Transcript

The contents of this metal cylinder could either revolutionize technology or be completely useless— it all depends on whether we can harness the strange physics of matter at very, very small scales. To have even a chance of doing so, we have to control the environment precisely: the thick tabletop and legs guard against vibrations from footsteps, nearby elevators, and opening or closing doors. The cylinder is a vacuum chamber, devoid of all the gases in air. Inside the vacuum chamber is a smaller, extremely cold compartment, reachable by tiny laser beams. Inside are ultra-sensitive particles that make up a quantum computer.

So what makes these particles worth the effort? In theory, quantum computers could outstrip the computational limits of classical computers. Classical computers process data in the form of bits. Each bit can switch between two states labeled zero and one. A quantum computer uses something called a qubit, which can switch between zero, one, and what’s called a superposition. While the qubit is in its superposition, it has a lot more information than one or zero. You can think of these positions as points on a sphere: the north and south poles of the sphere represent one and zero. A bit can only switch between these two poles, but when a qubit is in its superposition, it can be at any point on the sphere. We can’t locate it exactly — the moment we read it, the qubit resolves into a zero or a one. But even though we can’t observe the qubit in its superposition, we can manipulate it to perform particular operations while in this state.

So as a problem grows more complicated, a classical computer needs correspondingly more bits to solve it, while a quantum computer will theoretically be able to handle more and more complicated problems without requiring as many more qubits as a classical computer would need bits.

The unique properties of quantum computers result from the behavior of atomic and subatomic particles. These particles have quantum states, which correspond to the state of the qubit. Quantum states are incredibly fragile, easily destroyed by temperature and pressure fluctuations, stray electromagnetic fields, and collisions with nearby particles. That’s why quantum computers need such an elaborate set up. It’s also why, for now, the power of quantum computers remains largely theoretical. So far, we can only control a few qubits in the same place at the same time.

There are two key components involved in managing these fickle quantum states effectively: the types of particles a quantum computer uses, and how it manipulates those particles. For now, there are two leading approaches: trapped ions and superconducting qubits.

A trapped ion quantum computer uses ions as its particles and manipulates them with lasers. The ions are housed in a trap made of electrical fields. Inputs from the lasers tell the ions what operation to make by causing the qubit state to rotate on the sphere. To use a simplified example, the lasers could input the question: what are the prime factors of 15? In response, the ions may release photons — the state of the qubit determines whether the ion emits photons and how many photons it emits. An imaging system collects these photons and processes them to reveal the answer: 3 and 5.

Superconducting qubit quantum computers do the same thing in a different way: using a chip with electrical circuits instead of an ion trap. The states of each electrical circuit translate to the state of the qubit. They can be manipulated with electrical inputs in the form of microwaves. So: the qubits come from either ions or electrical circuits, acted on by either lasers or microwaves. Each approach has advantages and disadvantages. Ions can be manipulated very precisely, and they last a long time, but as more ions are added to a trap, it becomes increasingly difficult to control each with precision. We can’t currently contain enough ions in a trap to make advanced computations, but one possible solution might be to connect many smaller traps that communicate with each other via photons rather than trying to create one big trap. Superconducting circuits, meanwhile, make operations much faster than trapped ions, and it’s easier to scale up the number of circuits in a computer than the number of ions. But the circuits are also more fragile, and have a shorter overall lifespan.

And as quantum computers advance, they will still be subject to the environmental constraints needed to preserve quantum states. But in spite of all these obstacles, we’ve already succeeded at making computations in a realm we can’t enter or even observe.

My English Words List - February - 2022

spruce

spruce

noun

Norway spruce (Picea abies)

  • a type of tree that has long, thin needles instead of leaves and that stays green throughout the year
  • an evergreen tree that has short needles for leaves, drooping cones, and light soft wood

Colorado blue spruce

Blue spruce

The blue spruce (Picea pungens), also commonly known as green spruce, white spruce, Colorado spruce, or Colorado blue spruce, is a species of spruce tree.

verb

Do you want to spruce up the house with me?

Let me spruce up before we go.

adjective

  • neat or smart in appearance

He looked very spruce in his new suit.

hemlock

hemlock

noun

Tsuga heterophylla

  • any of a genus (Tsuga) of evergreen coniferous trees of the pine family

Tsuga

cedar

cedar

noun

Lebanon cedar in Al Shouf Cedar Nature Reserve, Barouk, Lebanon

Cedrus

beech

beech

noun

North American beech (Fagus grandifolia), seen in autumn

Beech

aspen

aspen

noun

American aspens, Populus tremuloides

Aspen

butternut

butternut

noun

A mature butternut tree

A butternut

Juglans cinerea

Juglans cinerea, commonly known as butternut or white walnut, is a species of walnut native to the eastern United States and southeast Canada.

awe

awe

noun

regard nature’s wonders with awe

Awe: The ‘little earthquake’ that could free your mind

Intentionally seeking the feeling of awe can improve memory, boost creativity and relieve anxious ruminatio

verb

We were awed by the beauty of the mountains.

varicose

varicose

adjective

Left leg affected by varicose veins

varicose veins

varicose legs

What are the complications of varicose veins?

  • Inflammation or swelling of veins (phlebitis)
  • Blood clots

Can varicose veins be prevented?

  • Keeping a healthy weight
  • Exercising regularly
  • Putting your feet up while sitting
  • Not crossing your legs while sitting
  • Not wearing tight clothing

https://www.hopkinsmedicine.org/health/conditions-and-diseases/varicose-veins

Varicose veins

arboretum

arboretum

noun

Autumn colours at Westonbirt Arboretum, Gloucestershire, England

Arboretum

fiber

fiber

noun

It’s important to get enough fiber in your diet.

What foods do you recommend as good sources of fiber?

Nylon is a very strong man-made fiber.

Fiber

calorie

calorie

noun

Calorie

mandate

mandate

noun

As anti-vaccine mandate protest enters 5th day in Ottawa, some worry about how it might end

leeway

leeway

noun

They give their students leeway to try new things.

you will be given some leeway in choosing how to carry out the project

pangolin

pangolin

noun

Illustration of pangolin

Living species of pangolins

Pangolin

anteater

anteater

noun

Giant anteater

Anteater

armadillo

armadillo

noun

Illustration of armadillo

Glyptodon (Natural History Museum, Vienna) and Dasypus novemcinctus

Armadillo

chill

chill

noun

He had caught a chill that night, and was now down with a fever.

He closed the windows to keep out the chill.

Her symptoms include chills and a fever.

He caught a chill that turned into a bad cold.

adjective

The chill weather kept us indoors.

Celsius

A thermometer calibrated in degrees Celsius

Celsius

adjective

The temperature reached 23 degrees Celsius.

Celsius

Fahrenheit

Fahrenheit

adjective

Thermometer with Fahrenheit (marked on outer bezel) and Celsius (marked on inner dial) degree units. The Fahrenheit scale was the first standardized temperature scale to be widely used.

It was 70 degrees Fahrenheit outside.

Fahrenheit

nausea

nausea

noun

Some people experience nausea when flying.

Nausea

vomit

vomit

verb

The dog vomited on the floor.

The patient was vomiting blood.

noun

Vomiting

Vomiting

warthog

warthog

noun

Illustration of warthog

Male common warthog

Warthog

yacht

yacht

noun

Maltese Falcon sailing yacht in 2008

Yacht

TL;DR

TL;DR

abbreviation

  • too long; didn’t read — used to say that something would require too much time to read

a TL;DR video

groovy

groovy

adjective

a great movie with groovy special effects

Sisyphean

Sisyphean

adjective

Sisyphus (1548–49) by Titian, Prado Museum, Madrid, Spain

a Sisyphean task

Sisyphus

squall

squall

noun

  • a sudden strong gust of wind often with rain or snow

snow squall

Winter conditions on Ontario Highway 401 in Toronto due to a snowsquall.

Snowsquall

boredom

boredom

noun

Boredom by Gaston de La Touche, 1893

  • the state of being weary and restless through lack of interest
  • the state of being bored

the boredom of a long car trip

Boredom

outage

outage

noun

  • a period of interruption especially of electric current

Strong wind gusts may result in broken tree branches as well as isolated power outages.

Power outage

spiky

spiky

adjective

a plant with spiky leaves

spike

spike

noun

railroad spikes

If price spikes continue, people will not be able to afford the new houses they want.

Liberty spikes

Spike protein

asteroid

asteroid

noun

The four largest asteroids: 1 Ceres, 4 Vesta, 2 Pallas, and 10 Hygiea

Most asteroids are found between Mars and Jupiter.

Asteroid

sump

sump

noun

Illustration of a typical pedestal-type sump pump

Sump pump

LeetCode - Algorithms - 8. String to Integer (atoi)

Problem

8. String to Integer (atoi)

Java

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
class Solution {
public int myAtoi(String s) {
int re = 0;
long num = 0;
s = s.trim();
char[] a = s.toCharArray();
int len = a.length;
int[] digits = new int[len];
int k = 0;
boolean isNegative = false;
char c = ' ';
if (len > 0) {
boolean hasSignFlag = false;
if (a[0] == '+' || a[0] == '-')
hasSignFlag = true;
if (a[0] == '-')
isNegative = true;
if (a[0] == '+')
isNegative = false;
for (int i = hasSignFlag ? 1 : 0; i < len; i++) {
c = a[i];
if (Character.isDigit(c))
digits[k++] = Integer.parseInt(c + "");
else if (!Character.isDigit(c))
break;
else
;
}
}
for (int m = 0; m < k; m++)
num += digits[m] * Math.pow(10, k - m - 1);
if (isNegative)
num *= -1;
if (num < Integer.MIN_VALUE)
num = Integer.MIN_VALUE;
if (num > Integer.MAX_VALUE)
num = Integer.MAX_VALUE;
re = new Long(num).intValue();
return re;
}
}

Submission Detail

  • 1082 / 1082 test cases passed.
  • Runtime: 5 ms, faster than 26.19% of Java online submissions for String to Integer (atoi).
  • Memory Usage: 38.9 MB, less than 80.12% of Java online submissions for String to Integer (atoi).