LeetCode - Algorithms - 704. Binary Search

Although the basic idea of binary search is comparatively straightforward, the details can be surprisingly tricky … — Donald Knuth

in the history in Section 6.2.1 of his Sorting and Searching, Knuth points out that while the first binary search was published in 1946, the first published binary search without bugs did not appear untial 1962. – Programming Pearls, Jon Bentley

Problem

704. Binary Search

Java

1

Copyright © 2000–2019 Robert Sedgewick and Kevin Wayne. All rights reserved.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class Solution {
public int search(int[] nums, int target) {
int lo = 0;
int hi = nums.length - 1;
while (lo <= hi) {
int mid = lo + (hi - lo) / 2;
if (target < nums[mid])
hi = mid - 1;
else if (target > nums[mid])
lo = mid + 1;
else
return mid;
}
return -1;
}
}

Submission Detail

  • 46 / 46 test cases passed.
  • Runtime: 0 ms, faster than 100.00% of Java online submissions for Binary Search.
  • Memory Usage: 40.6 MB, less than 29.73% of Java online submissions for Binary Search.

2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class Solution {
public int search(int[] nums, int target) {
final int len = nums.length;
int left=0, right=len-1;
while(left<=right) {
int mid = (left+right)/2;
if (nums[mid]>target) {
right = mid-1;
}
else if (nums[mid]<target){
left = mid+1;
}
else {
return mid;
}
}
return -1;
}
}

Submission Detail

  • 46 / 46 test cases passed.
  • Runtime: 0 ms, faster than 100.00% of Java online submissions for Binary Search.
  • Memory Usage: 42.8 MB, less than 5.41% of Java online submissions for Binary Search.

ref

Do we see reality as it is? - Donald Hoffman - TED2015 - Transcript

Cognitive scientist Donald Hoffman is trying to answer a big question: Do we experience the world as it really is … or as we need it to be? In this ever so slightly mind-blowing talk, he ponders how our minds construct reality for us.

I love a great mystery, and I’m fascinated by the greatest unsolved mystery in science, perhaps because it’s personal. It’s about who we are, and I can’t help but be curious.

The mystery is this: What is the relationship between your brain and your conscious experiences, such as your experience of the taste of chocolate or the feeling of velvet?

Now, this mystery is not new. In 1868, Thomas Huxley wrote, “How it is that anything so remarkable as a state of consciousness comes about as the result of irritating nervous tissue is just as unaccountable as the appearance of the genie when Aladdin rubbed his lamp.” Now, Huxley knew that brain activity and conscious experiences are correlated, but he didn’t know why. To the science of his day, it was a mystery. In the years since Huxley, science has learned a lot about brain activity, but the relationship between brain activity and conscious experiences is still a mystery. Why? Why have we made so little progress? Well, some experts think that we can’t solve this problem because we lack the necessary concepts and intelligence. We don’t expect monkeys to solve problems in quantum mechanics, and as it happens, we can’t expect our species to solve this problem either. Well, I disagree. I’m more optimistic. I think we’ve simply made a false assumption. Once we fix it, we just might solve this problem. Today, I’d like tell you what that assumption is, why it’s false, and how to fix it.

Let’s begin with a question: Do we see reality as it is? I open my eyes and I have an experience that I describe as a red tomato a meter away. As a result, I come to believe that in reality, there’s a red tomato a meter away. I then close my eyes, and my experience changes to a gray field, but is it still the case that in reality, there’s a red tomato a meter away? I think so, but could I be wrong? Could I be misinterpreting the nature of my perceptions?

We have misinterpreted our perceptions before. We used to think the Earth is flat, because it looks that way. Pythagorus discovered that we were wrong. Then we thought that the Earth is the unmoving center of the Universe, again because it looks that way. Copernicus and Galileo discovered, again, that we were wrong.

Galileo then wondered if we might be misinterpreting our experiences in other ways. He wrote: “I think that tastes, odors, colors, and so on reside in consciousness. Hence if the living creature were removed, all these qualities would be annihilated.”

Now, that’s a stunning claim. Could Galileo be right? Could we really be misinterpreting our experiences that badly? What does modern science have to say about this?

Well, neuroscientists tell us that about a third of the brain’s cortex is engaged in vision. When you simply open your eyes and look about this room, billions of neurons and trillions of synapses are engaged.

Now, this is a bit surprising, because to the extent that we think about vision at all, we think of it as like a camera. It just takes a picture of objective reality as it is. Now, there is a part of vision that’s like a camera: the eye has a lens that focuses an image on the back of the eye where there are 130 million photoreceptors, so the eye is like a 130-megapixel camera. But that doesn’t explain the billions of neurons and trillions of synapses that are engaged in vision. What are these neurons up to?

Well, neuroscientists tell us that they are creating, in real time, all the shapes, objects, colors, and motions that we see. It feels like we’re just taking a snapshot of this room the way it is, but in fact, we’re constructing everything that we see. We don’t construct the whole world at once. We construct what we need in the moment.

Now, there are many demonstrations that are quite compelling that we construct what we see. I’ll just show you two. In this example, you see some red discs with bits cut out of them, but if I just rotate the disks a little bit, suddenly, you see a 3D cube pop out of the screen. Now, the screen of course is flat, so the three-dimensional cube that you’re experiencing must be your construction.

In this next example, you see glowing blue bars with pretty sharp edges moving across a field of dots. In fact, no dots move. All I’m doing from frame to frame is changing the colors of dots from blue to black or black to blue. But when I do this quickly, your visual system creates the glowing blue bars with the sharp edges and the motion. There are many more examples, but these are just two that you construct what you see.

But neuroscientists go further. They say that we reconstruct reality. So, when I have an experience that I describe as a red tomato, that experience is actually an accurate reconstruction of the properties of a real red tomato that would exist even if I weren’t looking.

Now, why would neuroscientists say that we don’t just construct, we reconstruct? Well, the standard argument given is usually an evolutionary one. Those of our ancestors who saw more accurately had a competitive advantage compared to those who saw less accurately, and therefore they were more likely to pass on their genes. We are the offspring of those who saw more accurately, and so we can be confident that, in the normal case, our perceptions are accurate. You see this in the standard textbooks. One textbook says, for example, “Evolutionarily speaking, vision is useful precisely because it is so accurate.” So the idea is that accurate perceptions are fitter perceptions. They give you a survival advantage.

Now, is this correct? Is this the right interpretation of evolutionary theory? Well, let’s first look at a couple of examples in nature.

The Australian jewel beetle is dimpled, glossy and brown. The female is flightless. The male flies, looking, of course, for a hot female. When he finds one, he alights and mates. There’s another species in the outback, Homo sapiens. The male of this species has a massive brain that he uses to hunt for cold beer. (Laughter) And when he finds one, he drains it, and sometimes throws the bottle into the outback. Now, as it happens, these bottles are dimpled, glossy, and just the right shade of brown to tickle the fancy of these beetles. The males swarm all over the bottles trying to mate. They lose all interest in the real females. Classic case of the male leaving the female for the bottle. (Laughter) (Applause) The species almost went extinct. Australia had to change its bottles to save its beetles. (Laughter) Now, the males had successfully found females for thousands, perhaps millions of years. It looked like they saw reality as it is, but apparently not. Evolution had given them a hack. A female is anything dimpled, glossy and brown, the bigger the better. (Laughter) Even when crawling all over the bottle, the male couldn’t discover his mistake.

Now, you might say, beetles, sure, they’re very simple creatures, but surely not mammals. Mammals don’t rely on tricks. Well, I won’t dwell on this, but you get the idea. (Laughter)

So this raises an important technical question: Does natural selection really favor seeing reality as it is? Fortunately, we don’t have to wave our hands and guess; evolution is a mathematically precise theory. We can use the equations of evolution to check this out. We can have various organisms in artificial worlds compete and see which survive and which thrive, which sensory systems are more fit.

A key notion in those equations is fitness. Consider this steak: What does this steak do for the fitness of an animal? Well, for a hungry lion looking to eat, it enhances fitness. For a well-fed lion looking to mate, it doesn’t enhance fitness. And for a rabbit in any state, it doesn’t enhance fitness, so fitness does depend on reality as it is, yes, but also on the organism, its state and its action. Fitness is not the same thing as reality as it is, and it’s fitness, and not reality as it is, that figures centrally in the equations of evolution.

So, in my lab, we have run hundreds of thousands of evolutionary game simulations with lots of different randomly chosen worlds and organisms that compete for resources in those worlds. Some of the organisms see all of the reality, others see just part of the reality, and some see none of the reality, only fitness. Who wins?

Well, I hate to break it to you, but perception of reality goes extinct. In almost every simulation, organisms that see none of reality but are just tuned to fitness drive to extinction all the organisms that perceive reality as it is. So the bottom line is, evolution does not favor veridical, or accurate perceptions. Those perceptions of reality go extinct.

Now, this is a bit stunning. How can it be that not seeing the world accurately gives us a survival advantage? That is a bit counterintuitive. But remember the jewel beetle. The jewel beetle survived for thousands, perhaps millions of years, using simple tricks and hacks. What the equations of evolution are telling us is that all organisms, including us, are in the same boat as the jewel beetle. We do not see reality as it is. We’re shaped with tricks and hacks that keep us alive.

Still, we need some help with our intuitions. How can not perceiving reality as it is be useful? Well, fortunately, we have a very helpful metaphor: the desktop interface on your computer. Consider that blue icon for a TED Talk that you’re writing. Now, the icon is blue and rectangular and in the lower right corner of the desktop. Does that mean that the text file itself in the computer is blue, rectangular, and in the lower right-hand corner of the computer? Of course not. Anyone who thought that misinterprets the purpose of the interface. It’s not there to show you the reality of the computer. In fact, it’s there to hide that reality. You don’t want to know about the diodes and resistors and all the megabytes of software. If you had to deal with that, you could never write your text file or edit your photo. So the idea is that evolution has given us an interface that hides reality and guides adaptive behavior. Space and time, as you perceive them right now, are your desktop. Physical objects are simply icons in that desktop.

There’s an obvious objection. Hoffman, if you think that train coming down the track at 200 MPH is just an icon of your desktop, why don’t you step in front of it? And after you’re gone, and your theory with you, we’ll know that there’s more to that train than just an icon. Well, I wouldn’t step in front of that train for the same reason that I wouldn’t carelessly drag that icon to the trash can: not because I take the icon literally – the file is not literally blue or rectangular – but I do take it seriously. I could lose weeks of work. Similarly, evolution has shaped us with perceptual symbols that are designed to keep us alive. We’d better take them seriously. If you see a snake, don’t pick it up. If you see a cliff, don’t jump off. They’re designed to keep us safe, and we should take them seriously. That does not mean that we should take them literally. That’s a logical error.

Another objection: There’s nothing really new here. Physicists have told us for a long time that the metal of that train looks solid but really it’s mostly empty space with microscopic particles zipping around. There’s nothing new here. Well, not exactly. It’s like saying, I know that that blue icon on the desktop is not the reality of the computer, but if I pull out my trusty magnifying glass and look really closely, I see little pixels, and that’s the reality of the computer. Well, not really – you’re still on the desktop, and that’s the point. Those microscopic particles are still in space and time: they’re still in the user interface. So I’m saying something far more radical than those physicists.

Finally, you might object, look, we all see the train, therefore none of us constructs the train. But remember this example. In this example, we all see a cube, but the screen is flat, so the cube that you see is the cube that you construct. We all see a cube because we all, each one of us, constructs the cube that we see. The same is true of the train. We all see a train because we each see the train that we construct, and the same is true of all physical objects.

We’re inclined to think that perception is like a window on reality as it is. The theory of evolution is telling us that this is an incorrect interpretation of our perceptions. Instead, reality is more like a 3D desktop that’s designed to hide the complexity of the real world and guide adaptive behavior. Space as you perceive it is your desktop. Physical objects are just the icons in that desktop.

We used to think that the Earth is flat because it looks that way. Then we thought that the Earth is the unmoving center of reality because it looks that way. We were wrong. We had misinterpreted our perceptions. Now we believe that spacetime and objects are the nature of reality as it is. The theory of evolution is telling us that once again, we’re wrong. We’re misinterpreting the content of our perceptual experiences. There’s something that exists when you don’t look, but it’s not spacetime and physical objects. It’s as hard for us to let go of spacetime and objects as it is for the jewel beetle to let go of its bottle. Why? Because we’re blind to our own blindnesses. But we have an advantage over the jewel beetle: our science and technology. By peering through the lens of a telescope we discovered that the Earth is not the unmoving center of reality, and by peering through the lens of the theory of evolution we discovered that spacetime and objects are not the nature of reality. When I have a perceptual experience that I describe as a red tomato, I am interacting with reality, but that reality is not a red tomato and is nothing like a red tomato. Similarly, when I have an experience that I describe as a lion or a steak, I’m interacting with reality, but that reality is not a lion or a steak. And here’s the kicker: When I have a perceptual experience that I describe as a brain, or neurons, I am interacting with reality, but that reality is not a brain or neurons and is nothing like a brain or neurons. And that reality, whatever it is, is the real source of cause and effect in the world – not brains, not neurons. Brains and neurons have no causal powers. They cause none of our perceptual experiences, and none of our behavior. Brains and neurons are a species-specific set of symbols, a hack.

What does this mean for the mystery of consciousness? Well, it opens up new possibilities. For instance, perhaps reality is some vast machine that causes our conscious experiences. I doubt this, but it’s worth exploring. Perhaps reality is some vast, interacting network of conscious agents, simple and complex, that cause each other’s conscious experiences. Actually, this isn’t as crazy an idea as it seems, and I’m currently exploring it.

But here’s the point: Once we let go of our massively intuitive but massively false assumption about the nature of reality, it opens up new ways to think about life’s greatest mystery. I bet that reality will end up turning out to be more fascinating and unexpected than we’ve ever imagined.

The theory of evolution presents us with the ultimate dare: Dare to recognize that perception is not about seeing truth, it’s about having kids. And by the way, even this TED is just in your head.

Thank you very much.

(Applause)

Chris Anderson: If that’s really you there, thank you. So there’s so much from this. I mean, first of all, some people may just be profoundly depressed at the thought that, if evolution does not favor reality, I mean, doesn’t that to some extent undermine all our endeavors here, all our ability to think that we can think the truth, possibly even including your own theory, if you go there?

Donald Hoffman: Well, this does not stop us from a successful science. What we have is one theory that turned out to be false, that perception is like reality and reality is like our perceptions. That theory turns out to be false. Okay, throw that theory away. That doesn’t stop us from now postulating all sorts of other theories about the nature of reality, so it’s actually progress to recognize that one of our theories was false. So science continues as normal. There’s no problem here.

CA: So you think it’s possible – (Laughter) – This is cool, but what you’re saying I think is it’s possible that evolution can still get you to reason.

DH: Yes. Now that’s a very, very good point. The evolutionary game simulations that I showed were specifically about perception, and they do show that our perceptions have been shaped not to show us reality as it is, but that does not mean the same thing about our logic or mathematics. We haven’t done these simulations, but my bet is that we’ll find that there are some selection pressures for our logic and our mathematics to be at least in the direction of truth. I mean, if you’re like me, math and logic is not easy. We don’t get it all right, but at least the selection pressures are not uniformly away from true math and logic. So I think that we’ll find that we have to look at each cognitive faculty one at a time and see what evolution does to it. What’s true about perception may not be true about math and logic.

CA: I mean, really what you’re proposing is a kind of modern-day Bishop Berkeley interpretation of the world: consciousness causes matter, not the other way around.

DH: Well, it’s slightly different than Berkeley. Berkeley thought that, he was a deist, and he thought that the ultimate nature of reality is God and so forth, and I don’t need to go where Berkeley’s going, so it’s quite a bit different from Berkeley. I call this conscious realism. It’s actually a very different approach.

CA: Don, I could literally talk with you for hours, and I hope to do that.

Thanks so much for that. DH: Thank you. (Applause)

LeetCode - Algorithms - 130. Surrounded Regions

Problem

130. Surrounded Regions

Java

BFS

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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
class Solution {
private final static int d[][] = {
{0, 1},
{1, 0},
{0, -1},
{-1, 0}
};

public void solve(char[][] board) {
int h = board.length;
int w = h==0 ? 0 : board[0].length;

if (h==0 || w==0) return;

for (int j = 0; j < w; j++) {
if (board[0][j] == 'O') bfs(0, j, board, h, w);
if (board[h - 1][j] == 'O') bfs(h - 1, j, board, h, w);
}

for (int i = 1; i < h-1; i++) {
if (board[i][0] == 'O') bfs(i, 0, board, h, w);
if (board[i][w - 1] == 'O') bfs(i, w - 1, board, h, w);
}

for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
if (board[i][j] == 'O') board[i][j] = 'X';
if (board[i][j] == 'B') board[i][j] = 'O';
}
}
}

private void bfs(int i, int j, char[][] board, int h, int w) {
Queue<Point> queue = new LinkedList<>();
queue.add(new Point(i,j));
while (!queue.isEmpty()) {
Point curr = queue.poll();
int row = curr.x;
int col = curr.y;
if (isValid(board, h, w, row, col)) {
board[row][col] = 'B';
for (int[] c: d) {
int x = curr.x + c[0];
int y = curr.y + c[1];
queue.add(new Point(x, y));
}
}
}
}

private boolean isValid(char[][] grid, int width, int height, int row, int col) {
return (row >= 0) && (row < width) && (col >= 0) && (col < height) && grid[row][col] == 'O';
}
}

class Point {
int x;
int y;

public Point(int x, int y) {
this.x = x;
this.y = y;
}
}

Submission Detail

  • 59 / 59 test cases passed.
  • Runtime: 2 ms, faster than 55.96% of Java online submissions for Surrounded Regions.
  • Memory Usage: 41.7 MB, less than 64.29% of Java online submissions for Surrounded Regions.

ref

What would happen if you didn’t drink water? - Mia Nacamulli - TED-Ed - Transcript

Water is essentially everywhere in our world, and the average human is composed of between 55 and 60% water. So what role does water play in our bodies, and how much do we actually need to drink to stay healthy? Mia Nacamulli details the health benefits of hydration.

Water is virtually everywhere, from soil moisture and ice caps, to the cells inside our own bodies. Depending on factors like location, fat index, age, and sex, the average human is between 55-60% water. At birth, human babies are even wetter. Being 75% water, they are swimmingly similar to fish. But their water composition drops to 65% by their first birthday. So what role does water play in our bodies, and how much do we actually need to drink to stay healthy? The H20 in our bodies works to cushion and lubricate joints, regulate temperature, and to nourish the brain and spinal cord. Water isn’t only in our blood. An adult’s brain and heart are almost three quarters water. That’s roughly equivalent to the amount of moisture in a banana. Lungs are more similar to an apple at 83%. And even seemingly dry human bones are 31% water. If we are essentially made of water, and surrounded by water, why do we still need to drink so much? Well, each day we lose two to three liters through our sweat, urine, and bowel movements, and even just from breathing. While these functions are essential to our survival, we need to compensate for the fluid loss. Maintaining a balanced water level is essential to avoid dehydration or over-hydration, both of which can have devastating effects on overall health. At first detection of low water levels, sensory receptors in the brain’s hypothalamus signal the release of antidiuretic hormone. When it reached the kidneys, it creates aquaporins, special channels that enable blood to absorb and retain more water, leading to concentrated, dark urine. Increased dehydration can cause notable drops in energy, mood, skin moisture, and blood pressure, as well as signs of cognitive impairment. A dehydrated brain works harder to accomplish the same amount as a normal brain, and it even temporarily shrinks because of its lack of water. Over-hydration, or hyponatremia, is usually caused by overconsumption of water in a short amount of time. Athletes are often the victims of over-hydration because of complications in regulating water levels in extreme physical conditions. Whereas the dehydrated brain amps up the production of antidiuretic hormone, the over-hydrated brain slows, or even stops, releasing it into the blood. Sodium electrolytes in the body become diluted, causing cells to swell. In severe cases, the kidneys can’t keep up with the resulting volumes of dilute urine. Water intoxication then occurs, possibly causing headache, vomiting, and, in rare instances, seizures or death. But that’s a pretty extreme situation. On a normal, day-to-day basis, maintaining a well-hydrated system is easy to manage for those of us fortunate enough to have access to clean drinking water. For a long time, conventional wisdom said that we should drink eight glasses a day. That estimate has since been fine-tuned. Now, the consensus is that the amount of water we need to imbibe depends largely on our weight and environment. The recommended daily intake varies from between 2.5-3.7 liters of water for men, and about 2-2.7 liters for women, a range that is pushed up or down if we are healthy, active, old, or overheating. While water is the healthiest hydrator, other beverages, even those with caffeine like coffee or tea, replenish fluids as well. And water within food makes up about a fifth of our daily H20 intake. Fruits and vegetables like strawberries, cucumbers, and even broccoli are over 90% water, and can supplement liquid intake while providing valuable nutrients and fiber. Drinking well might also have various long-term benefits. Studies have shown that optimal hydration can lower the chance of stroke, help manage diabetes, and potentially reduce the risk of certain types of cancer. No matter what, getting the right amount of liquid makes a world of difference in how you’ll feel, think, and function day to day.

LeetCode - Algorithms - 542. 01 Matrix

Problem

542. 01 Matrix

Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell.

The distance between two adjacent cells is 1.

Java

BFS

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
42
43
44
45
46
47
48
49
50
51
52
class Solution {
final static int d[][] = {
{0,1},
{1,0},
{0,-1},
{-1,0}
};

public int[][] updateMatrix(int[][] matrix) {
int h = matrix.length;
int w = matrix[0].length;
int[][] dist = new int[h][w];

for(int i=0;i<h;i++) {
for(int j=0;j<w;j++) {
dist[i][j]=Integer.MAX_VALUE;
}
}

Queue<int[]> queue = new LinkedList<int[]>();
for(int i=0;i<h;i++) {
for(int j=0;j<w;j++) {
if (matrix[i][j]==0) {
dist[i][j]=0;
queue.add(new int[]{i,j});
}
}
}

while (!queue.isEmpty()) {
int[] curr = queue.poll();
int row = curr[0];
int col = curr[1];
for (int i = 0; i < 4; i++) {
int x = row + d[i][0];
int y = col + d[i][1];
if (isValid(matrix, h, w, x, y)) {
if (dist[x][y]>dist[row][col]+1) {
dist[x][y] = dist[row][col]+1;
queue.add(new int[]{x,y});
}
}
}
}

return dist;
}

private boolean isValid(int[][] grid, int width, int height, int row, int col) {
return (row >= 0) && (row < width) && (col >= 0) && (col < height);
}
}

Submission Detail

  • 48 / 48 test cases passed.
  • Runtime: 14 ms, faster than 64.69% of Java online submissions for 01 Matrix.
  • Memory Usage: 44 MB, less than 100.00% of Java online submissions for 01 Matrix.

ref

IntelliJ IDEA Cheat Sheet

Shortcuts

Double Shift

Search Everywhere

Find anything related to IntelliJ IDEA or your project and open it, execute it, or jump to it.

Ctrl+E

View recent files, Recent files popup

Select a recently opened file from the list.

Alt + 1

Project window

Esc

focus on editor

Alt + Enter

Show intention actions and quick-fixes

Alt+F1

locate the current file in the project structure

F2

Next highlighted error

Ctrl + B

go to declaration

Alt + F7

find usages

Tap Ctrl Twice

Run anything

Ctrl + W / Shift + Ctrl + W

Extend / Shrink Selection

Shift + Ctrl + Enter

Complete current statement

Shift + Ctrl + Alt + T

Refactor

Shift + Ctrl + A

Find Action

Ctrl+Shift+F

Find the search string in a project, Find in path

Add, Delete, and Move Lines

Ctrl+Y

To delete the current line

Ctrl + Mouse Wheel

zoom text content

Reformat and rearrange code

Ctrl+Alt+L

Reformat a code fragment in a file

Generating code

Alt+Insert

Generate getters and setters for a class

find and locate

Ctrl + Shift + M

Ctrl + [, Ctrl + ] also worked

move Caret to matching brace, Move Caret to Code Block Start/End

Alt+Enter

Auto import suggestion

Ctrl + G

Go to Line

Ctrl + Shift + Up / Down

Move Lines

Ctrl + Shift + F10

Run

preference

Change the UI theme

Settings/Preferences | Appearance & Behavior | Appearance

Theme list

  • Darcula: Default dark theme
  • Light: More traditional light theme
  • High contrast: Theme designed for users with color vision deficiency

Export/import project structure

  • *.iml (module description files)
  • .idea folder

Module dependencies

dependency scope

  • Compile: required to build, test, and run a project (the default scope).
  • Test: required to compile and run unit tests.
  • Runtime: included in the classpath for your sources and test sources but only at the run phase.
  • Provided: used for building and testing a project.

clear the caches in Intellij IDEA

file menu, Clear Caches and Restart, select option to restart

Debugger

Step over F8

Step into F7

Resume program F9

Run to cursor Alt + F9

Drop Frame

others

Console output encoding

On the Help menu, click Edit Custom VM Options.

1
2
-Dfile.encoding=UTF-8
-Dconsole.encoding=UTF-8

HTTP client

cookies

http-client.cookies file under the .idea/httpRequests/ directory

LeetCode - Algorithms - 690. Employee Importance

Problem

690. Employee Importance

Java

BFS

1

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
42
43
44
45
46
47
/*
// Employee info
class Employee {
// It's the unique id of each node;
// unique id of this employee
public int id;
// the importance value of this employee
public int importance;
// the id of direct subordinates
public List<Integer> subordinates;
};
*/
class Solution {
public int getImportance(List<Employee> employees, int id) {
int r = 0;

boolean[] visited = new boolean[employees.size()];
Queue<Integer> queue = new LinkedList<Integer>();
for(int i=0; i<employees.size(); i++) {
Employee e = employees.get(i);
if (e.id==id) {
for(Integer subId:e.subordinates)
queue.add(subId);
r+=e.importance;
visited[i]=true;
break;
}
}

while (!queue.isEmpty()) {
int currId = queue.poll();
for(int i=0; i<employees.size(); i++) {
if (!visited[i]) {
Employee e = employees.get(i);
if (e.id==currId) {
for(Integer subId:e.subordinates)
queue.add(subId);
r+=e.importance;
visited[i]=true;
}
}
}
}

return r;
}
}

Submission Detail

  • 108 / 108 test cases passed.
  • Runtime: 14 ms, faster than 12.95% of Java online submissions for Employee Importance.
  • Memory Usage: 42.6 MB, less than 100.00% of Java online submissions for Employee Importance.

2

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
42
43
44
45
46
47
/*
// Employee info
class Employee {
// It's the unique id of each node;
// unique id of this employee
public int id;
// the importance value of this employee
public int importance;
// the id of direct subordinates
public List<Integer> subordinates;
};
*/
class Solution {
public int getImportance(List<Employee> employees, int id) {
int r = 0;

Map<Integer,Integer> map = new HashMap<Integer, Integer>();
boolean[] visited = new boolean[employees.size()];
for(int i=0; i<employees.size(); i++) {
map.put(employees.get(i).id, i);
visited[i] = false;
}

Queue<Integer> queue = new LinkedList<Integer>();

int idx = map.get(id);
Employee e = employees.get( idx );
for(Integer subId:e.subordinates)
queue.add(subId);
r+=e.importance;
visited[idx]=true;

while (!queue.isEmpty()) {
int currId = queue.poll();
idx = map.get(currId);
if (!visited[idx]) {
e = employees.get(idx);
for (Integer subId : e.subordinates)
queue.add(subId);
r += e.importance;
visited[idx] = true;
}
}

return r;
}
}

Submission Detail

  • 108 / 108 test cases passed.
  • Runtime: 5 ms, faster than 54.03% of Java online submissions for Employee Importance.
  • Memory Usage: 40.8 MB, less than 100.00% of Java online submissions for Employee Importance.

DFS

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
42
43
44
/*
// Employee info
class Employee {
// It's the unique id of each node;
// unique id of this employee
public int id;
// the importance value of this employee
public int importance;
// the id of direct subordinates
public List<Integer> subordinates;
};
*/
class Solution {
public int getImportance(List<Employee> employees, int id) {
Map<Integer,Integer> map = new HashMap<Integer, Integer>();
boolean[] visited = new boolean[employees.size()];
for(int i=0; i<employees.size(); i++) {
map.put(employees.get(i).id, i);
visited[i] = false;
}

int idx = map.get(id);
Employee e = employees.get( idx );
int r = e.importance;
visited[idx]=true;
r += dfs(employees, e, map, visited);

return r;
}

private int dfs(List<Employee> employees, Employee employee, Map<Integer,Integer> map, boolean[] visited) {
int r = 0;
for(Integer subId:employee.subordinates) {
int idx = map.get(subId);
if (!visited[idx]) {
Employee e = employees.get(idx);
r += e.importance;
visited[idx]=true;
r += dfs(employees, e, map, visited);
}
}
return r;
}
}

Submission Detail

  • 108 / 108 test cases passed.
  • Runtime: 4 ms, faster than 99.82% of Java online submissions for Employee Importance.
  • Memory Usage: 40.9 MB, less than 100.00% of Java online submissions for Employee Importance.

LeetCode - Algorithms - 994. Rotting Oranges

Problem

994. Rotting Oranges

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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
class Solution {
final static int d[][] = {
{0,1},
{1,0},
{0,-1},
{-1,0}
};

private boolean isValid(int[][] grid, int width, int height, int row, int col) {
return (row >= 0) && (row < width) && (col >= 0) && (col < height) && grid[row][col]==1;
}

public int orangesRotting(int[][] grid) {
int h = grid.length;
int w = grid[0].length;

Queue<Node> queue = new LinkedList<Node>();

for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
if (grid[i][j] == 2) {
queue.add(new Node(new Point(i,j),0));
}
}
}

int ans = 0;

while (!queue.isEmpty()) {
Node curr = queue.poll();
int row = curr.pt.x;
int col = curr.pt.y;

for (int i = 0; i < 4; i++) {
int x = row + d[i][0];
int y = col + d[i][1];
if (isValid(grid, h, w, x, y)) {
grid[x][y] = 2;
queue.add(new Node(new Point(x, y), curr.dist + 1));
ans = curr.dist + 1;
}
}
}

for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
if (grid[i][j] == 1) {
return -1;
}
}
}

return ans;
}

class Point {
int x;
int y;

public Point(int x, int y) {
this.x = x;
this.y = y;
}
}

class Node {
Point pt;
int dist;

public Node(Point pt, int dist) {
this.pt = pt;
this.dist = dist;
}
}
}

Submission Detail

  • 303 / 303 test cases passed.
  • Runtime: 2 ms, faster than 91.42% of Java online submissions for Rotting Oranges.
  • Memory Usage: 38.4 MB, less than 81.25% of Java online submissions for Rotting Oranges.

ref

Josephus problem

Concrete mathematics is Eulerian mathematics.
Concrete Mathematics, Ronald L. Graham & Donald E. Knuth & Oren Patashnik

Problem

Josephus problem is a math puzzle with a grim description: n prisoners are standing on a circle, sequentially numbered from 0 to n-1.
An executioner walks along the circle, starting from prisoner 0, removing every kth prisoner and killing him.
As the process goes on, the circle becomes smaller and smaller, until only one prisoner remains, who is then freed.

Java

recurrence

1

1
2
3
4
5
6
public static int josephus(int n, int k) {
if (n == 1)
return 1;
else
return (josephus(n - 1, k) + k - 1) % n + 1;
}

2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
public static int execute(int n, int k){
int killIdx = 0;
ArrayList<Integer> prisoners = new ArrayList<Integer>(n);
for(int i = 0;i < n;i++){
prisoners.add(i);
}
System.out.println("Prisoners executed in order:");
while(prisoners.size() > 1){
killIdx = (killIdx + k - 1) % prisoners.size();
System.out.print(prisoners.get(killIdx) + " ");
prisoners.remove(killIdx);
}
System.out.println();
return prisoners.get(0);
}

circular linked list

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
static class Node {
public int data;
public Node next;

public Node(int data) {
this.data = data;
}
}

public static void getJosephusPosition(int m, int n) {
Node head = new Node(1);
Node prev = head;
for (int i = 2; i <= n; i++) {
prev.next = new Node(i);
prev = prev.next;
}

prev.next = head;

Node ptr1 = head, ptr2 = head;

while (ptr1.next != ptr1) {
int count = 1;
while (count != m) {
ptr2 = ptr1;
ptr1 = ptr1.next;
count++;
}

ptr2.next = ptr1.next;
ptr1 = ptr2.next;
}
System.out.printf("Last person left standing (Josephus Position) is %d \n", ptr1.data);
}

ref

H.O.P.E. What You Eat Matters (2018) – Full Transcript

from © H.O.P.E. What You Eat Matters (2018) – Full Transcript


“This important film highlights the choices we must make to help protect this planet and all its inhabitants.”
Paul McCartney

Dr. Jane Goodall, Primatologist, UN Messenger of Peace | GB: I think the most important message that I have, is to remember that you, and I’m speaking to you, watching this film, you make a difference! You as an individual make a difference… What you do each day actually is effecting what’s going on in the world each day. So your life matters, you matter and use your life wisely.

FME Media presents
a film by
Nina Messinger

H.O.P.E. What You Eat Matters

“Let thy food be thy medicine and thy medicine be thy food.
Hippocrates

The Western diet, unfortunately, is associated with the development of some pretty serious diseases.

Heart disease, cancer, diabetes, obesity – it’s like a tsunami!

[Narrator] Cardiovascular diseases are the number one cause of death. Around the globe more than 17 million people die of a heart attack or stroke – per year. The number of cancer cases is rising dramatically. One out of every four men and one out of every five women die of cancer.
Diabetes has also become an epidemic. And already one out of two Europeans and Americans is overweight.

Dr. Caldwell B. Esselstyn, Surgeon, Researcher and Clinician | USA: The interesting thing is that all experts would agree that the cause of this tsunami really is our lifestyle. And the fascinating thing is that the major driving force within that lifestyle creating these illnesses is our dependence on animal nutrition.

Prof. Dr. T. Colin Campbell, Nutritional Biochemist | USA: And I think this idea needs to be conveyed to people that there is a strong association between the Western diet high in animal foods, processed foods, protein, fat and so forth – and diseases. People have to know that that really is true.

[Narrator] Never before have we been so well informed about nutrition, in theory. In practice, in everyday life, we succumb to mindless cravings. We devour instant meals, gobble cafeteria fare, and stuff our faces with fast food. And practically always contained in these products: meat!

Dr. Rüdiger Dahlke, Physician and Psychotherapist | Austria: Before, meat was rich people’s food, and average citizens never got it. Later, just once a week – Sunday roast. And now we can afford to all live kings and princes. Financially, at least. Healthwise we cannot afford it.

[Narrator] Despite all warnings, we are eating more and more meat: There is no day without meat, no feast without meat, no break without meat; it’s a normal part of our diets because it’s tradition, it’s cheap – and because it tastes good.

Sharon Kintz, Former Cardiac Patient | USA: My diet for 65 years was the SAD diet the Standard American Diet. I ate meat and chicken and fish and fowl and lots of butter… and anything that tasted good.

[Narrator] In 2010, at the age of 66, Sharon Kintz started to think about her eating habits – as the result of a dramatic event.

Kintz: At that time I already had been diagnosed with high blood pressure, so I was aware of that, but having a heart attack was a complete surprise to me. The only symptoms that I had, leading up to that, was heaviness in my arms, pain in my jaw and I would be tired, more tired than usual.

[Narrator] This health nightmare put Sharon Kintz in the intensive care unit.

Kintz: During the heart catheterization it was determined that I had a 100% blockage in one artery and 65% in one and 75% in the other. So, there actually was very little options open for me other than open heart surgery.

[Narrator] Caldwell B. Esselstyn is an expert in the field of heart disease, a world-renowned surgeon and researcher, and one of “the Best Doctors” in the United States. Today the 82-year-old directs the cardiovascular prevention and reversal program at the Cleveland Clinic Wellness Institute in Ohio. Back in the 1980s Dr. Esselstyn had already begun questioning the methods for treating heart disease. They only combated the symptoms, but didn’t get rid of the cause. Intensive research led him to the conclusion: Our cardiovascular diseases are caused by our eating habits!

Esselstyn: When we look at the cause of heart disease let’s not be confused and blame it on genes, or just blame it on somebody’s age, or blame it on the luck of the draw. Heart disease is a food born illness! And we now know that every time certain foods will pass your lips you will further endanger, and injure, the endothelial cell capacity to make nitric oxide.

[Narrator] Endothelial cells are crucial to our blood vessels and heart. They line our blood vessels and produce protective nitric oxide. And Nitric oxide has these marvelous functions of keeping your blood flowing smoothly, it is the strongest vasodilator in the body. It also protects you from getting hypertension because it keeps your artery wall from getting stiff, inflamed or thickened. Most importantly, a plentiful, normal amount of nitric oxide will prevent you from ever developing blockages or plaque.

[Narrator] Scientists know that cardiovascular disease starts with progressive damage to the endothelial cells. This is precisely where our diets come in … The excessive consumption of animal-based or processed foods damages our endothelial cells. Regular consumption of these products increasingly diminishes the protective nitric oxide supply in our blood vessels. This leads to inflammation and a hardening and narrowing of the blood vessels. These can have life-threatening consequences, like heart attack or stroke, or cause arteriosclerosis. Years of research and personal experience have provided Dr. Esselstyn with conclusive evidence that a plant-based diet can not only prevent the progression of heart disease but can also reverse its effects.

[Narrator] Esselstyn has successfully treated hundreds of patients with his program. It consists of a low-fat, purely plant-based diet.

Esselstyn: When you are willing to take the time and have the patients understand the science behind this and they really realize that they have caused these disease by the foods that they have eaten, they suddenly realize that you are empowering them as this locus of control to halt their disease. They don’t have to depend on their cardiologist, or an operation, or a drug that may have significant side effects. They are being empowered to do this themselves.

[Narrator] With Dr. Esselstyn’s help Sharon Kintz, too, completely restructured her diet – doing away with all animal products. She turned down the heart surgery recommended to her by her doctors. Sharon Kintz decided to use food as medicine.

Kintz: I was on it for four weeks and the pain went away in my arms and the pain went away in my jaws and I had much more energy. So I took Dr. Esselstyn’s program very seriously.

[Narrator] When Sharon Kintz was first diagnosed, she could hardly walk anymore. Nearly two years after her treatment with Dr.Esselstyn she is physically fit again. And she has fulfilled one of her dreams: In 2012, at the age of 68, she successfully took part in a half marathon – for the first time in her life.

Kintz: I know people are cramped for time, but your talking about your health and you want to live a long healthy life et être en mesure de contribuer à quelque chose and be able to contribute something then you have to take care about your body and in order to do that you have to – in my opinion – eat plant-based.

[Narrator] We also consume too much milk. And the availability of dairy products continues to grow. But do these products actually agree with us? After all nearly 75% of the world’s population and 20% of Europeans are lactose intolerant, in other words: unable to properly digest dairy products. Dairy products contain no complex carbohydrates or roughage and very few vitamins. Instead they are full of saturated fat, cholesterol, and animal protein.

Esselstyn: When we are young and growing up everybody wants to try to feed people dairy products and make sure you have milk every day. The science really now is at a point where that cannot be sustained. There is ample evidence from wonderful investigators like T. Colin Campbell who clearly showed that casein, which is the major protein in milk, is really one of the strongest promoters of cancer.

[Narrator] T. Colin Campbell is a world-renowned nutritional scientist. In a series of experiments he was able to prove that animal proteins – casein in particular – promote all stages of cancer growth. In experiments, rats were given carcinogenic substances. Afterwards, half were fed a 5% casein-enriched diet; and the other half 20%. 20% roughly corresponds to the amount consumed in Western diets.
With a 5% casein-enriched diet the animals did not develop cancer. With a 20% casein-enriched diet, however, cancer growth was stimulated significantly. Professor Campbell went a step further: Every three weeks he altered the rat’s diet.

Prof. T. Colin Campbell, Nutritional Biochemist | USA: So the next thing we did: we did some studies to start out with animals here and then let the cancer start to grow with the 20% casein, and then we switched to the 5%, it went off. We gave the 20% back again, it came back again. We put it on 5% it came off. So we could turn on and turn off cancer development just by switching the amount of casein they consumed.

[Narrator] Ces résultats sont également soutenus These findings are also supported by evidence with humans.

Esselstyn: We also know that all the saturated fat, and the casein in dairy, helps to accelerate and promote heart disease. Then we have this whole problem of fractures in the elderly. So, here we have this problem of increasing cancer, increasing heart disease and increasing fractures. Not a good thing, dairy really should be out.

Prof. Dr. Claus Leitzmann, Nutritionist and Biochemist | Germany: There is much debate that without milk we don’t get enough calcium. Calcium is important for bone stability, it is supposed to prevent osteoporosis. But tests on people who consume absolutely no milk or dairy products show that the osteoporosis incidence is much lower than with us.

Campbell: Dairy also has, and there is good evidence for this, has some allergenic properties. It tends to be associated with allergies, either directly associated or enhancing allergies coming from another source. And so we see things like, in the case of teenage boys, they get this acne sometimes, skin problem. A lot of that is due to their consumption of diary, stop dairy and this goes away. Dairy is associated with migraine headaches, I know a lot of people who have these migraine headaches, and it is kind of an allergy kind of thing. As is acne, that’s kind of an allergy kind of thing. You stop that and it goes away, and it is very fast. And I used to say that with great reluctance because I was raised on a dairy farm, I grew up milking cows, and then when I went away to do my doctorate and dissertation I did my dissertation on the idea of promoting more milk consumption. So I’m not saying these rather negative things about dairy for any ideological reason or any personal reasons, I’m saying it in reference to the evidence, the data. That’s what it shows.”

[Narrator] The excessive consumption of animal products such as meat, fish, dairy products, and eggs puts a strain on our bodies. That was also what Frankfurt-based physician Lothar Wendt found in his research.

Prof. Dr. Thomas Wendt, Cardiologist | Germany: In 1949 my father Lothar Wendt first formulated the concept of “Protein Storage Diseases”, which we have continued to develop since then. And the core thesis is this: Too much animal protein in one’s diet causes illness.

[Narrator] T.Colin Campbell arrived at the same conclusion. He has been at the cutting edge of nutritional research for more than 40 years, and in the 80s and 90s he directed the “China-Cornell-Oxford-Project”, better known as the “China Study”. This is the most comprehensive nutrition study in the history of biomedical research to date. It confirmed Campbell’s theory.

Campbell: We tend to want to consume protein, which means we want to consume meat, because that supposedly makes us strong and makes us healthy. That’s been an old story for a long time. But in reality, as we put more and more protein, or meat, into our diet we see these diseases start to appear.

[Narrator] The China Study – as well as numerous other studies – demonstrates one thing above all: The higher the consumption of animal products, the greater the frequency of heart disease, cancer, diabetes, and countless other chronic diseases. Even small amounts of animal products can have a significant negative effect on our health.

The 53-year-old electrical engineer Arthur Soteros also became a victim of his diet. Excessive amounts of meat, fish, and dairy products. The consequences caught up with him.

Arthur Soteros, Former Cardiac Patient | USA: My first health issues started about 20 something years ago when I was about 30-32 years of age. I was diagnosed with type 2 diabetes. That about 10 years later propagated into heart disease. My first encounter with heart disease was at 42 and what I exhibited was heart burn which turned out to be a blockage. I went to the emergency room and found out it was a blockage and I required intervention and a stent, that was my first encounter.

[Narrator] A stent is an implant designed to hold a vessel open. Arthur Soteros needed to have five such stents implanted. He repeatedly suffered from chest pain and a narrowing of his blood vessels. Finally, he needed double coronary bypass surgery.

Soteros: So I was sure that after doing the bypass surgery I would be free and clear from any heart issues for up to 10 years. That happened not to be the case with me. Ça n’a pas été le cas pour moi. About a year into that I developed angina again and what turned out then to be the vein graft they had used in my bypass surgery had now blocked, which then required another stent and a few months later another stent until the frequency of those stents became just 2 weeks apart.

[Narrator] The quickly returning vessel occlusions baffled the doctors. Soteros left the hospital without hope.

Soteros: I wept and I cried like a baby, because I wasn’t ready to die and I cried out to God for some options. I think God saved my life. It was God’s mercy and grace that actually gave me options and set my path straight and pointed me in the direction of plant-based.

[Narrator] Through a member of his church community Arthur Soteros learned about Dr. Esselstyn and his nutrition-based therapy. He consulted the doctor and with his help restructured his entire diet.

Soteros: Within 30-40 days from that point of the angina that I was experiencing and the facial numbness that I experienced during my heart disease, it was gone. It was then by following this diet of going plant based – within about 5 months from that point on – when I was doing a follow up with my cardiologist and family physician who had been monitoring my diabetes said that my diabetes was gone. And then I followed up in October of 2010 with my optometrist – the prescription glasses that I was wearing – they looked at me and said: “why was I wearing these things?” All I needed was just reading glasses. So then with the reversal of my diabetes my eyesight got better.

[Narrator] Arthur Soteros’ heart condition has disappeared. His blood test results are normal and he has been able to markedly reduce his medication. And he also lost 20 kilograms of excess body weight.

Soteros: I feel better now at age 53 than I did at age 30.

Campbell: Through the years I’ve had lots of students, lots of colleagues and plenty of money to do all kinds of research. And I found out that what I believed early was wrong: that a diet high in animal based foods is a problem; That a diet that is high in processed foods is a problem. In many different ways. The only solution is a whole food, plant-based diet! It’s that clear! And when people use that, they not only prevent future disease, they actually are able to cure existing disease in people who have a disease.

Ralf Brosius, Former Cancer Patient | Germany: In December 2006 I was diagnosed with lung cancer in the last stage. It had metastasized and spread to my lymph nodes. The tumor was removed and so were my lymph nodes. I was advised to start chemotherapy. I turned it down. Instead, I consulted a doctor who favors healing by plant-based means. I followed his advice and today I am free of cancer because I have given up eating animal products and I prefer plant products. But not just that, primarily pesticide-free, natural plants, vegetables, fruit, and other foods, which haven’t been heated and in this way I receive a maximum of nutrients. That is, in my opinion, why I am free of cancer today. –

Campbell: My wife Karen was diagnosed with a serious kind of cancer, stage 3 melanoma. She refused to take the chemotherapy and she refused to have the surgery. Then she really got strict about her diet. Now it’s about 9 years later and she has no problem.

Plant-based foods are so beneficial because they contain certain substances not found in animal products. For example dietary fibers or phytochemicals. As the name suggests, these substances are synthesized by plants, and today we know that particularly the phytochemicals have a very favorable effect on our health.

[Narrator] Plant-based foods give us sufficient protein and healthy fats; they are rich in complex carbohydrates and antioxidants as well as certain vitamins, trace elements, and enzymes. Plant-based foods contain what humans need for a healthy diet.

Dr. Ernst Walter Henrich, Physician and Nutrition Expert | Switzerland: The problem in general is: with products that are detrimental to our health, for example meat, milk, and eggs, a lot of money is being earned. And of course these companies and corporations want to make a profit. And they want to sell as many products as possible. On the other hand there are no interest groups whose agenda is to keep people healthy. Who is financially interested in keeping people healthy? No one. The medical industry earns money by treating patients. Sick people are the only ones the medical industry can make money on. The pharmaceutical industry just makes money on sick people too.

Campbell: We have a big, big industry that obviously supports the livestock industry and the egg industry and the dairy industry. It’s just a huge, huge industry. And unfortunately they have infiltrated the academic community. They’ve also infiltrated the government. And I know both because I’m in academia, that’s been my entire life. I see what they do, maybe they bring some money to have some research done. Also, in the policy area, I spent about 20 years on national policy development. I was on expert panels for the government. We were doing things, we have committees. Unfortunately, the industry is so powerful that they in many cases are controlling who is going to be on the committees. They have too much money for the politicians.”

Henrich: All of this may be legal, but it’s not fair to the consumer.

Dr. Will Tuttle, Bestselling Author, Musician | USA: I was actually raised eating the typical diet and when I was about 22 years old I became a vegetarian. About 5 years later, when I was 27, I went to a completely plant based diet. That’s been 33 years now, I’m 60 years old, and it has been terrific. I feel great, I have a lot of energy and it’s not just me. People that I know that are a long time on a plant based diet are doing great as well.

Esselstyn: The seismic revolution in health is just not ever going to occur from inventing another pill or drug. It’s not gonna come from inventing another procedure… or another operation. But the seismic revolution in health can come about when those of us in the healing profession are able to share with the public what is the lifestyle that is protecting them of the common and killing diseases. And the way we do that is to show them about plant-based-nutrition.

“Earth provides enough to satisfy every man’s needs, but not every man’s greed.”
Mahatma Gandhi

Karl Ludwig Schweisfurth, Formerly Europe’s Biggest Meat Producer | Germany: More and more people are devouring more and more animals because more and more people can afford meat, and in 20 years there will be so many people and so many animals on the planet Earth that there won’t be enough food. Then we’ll eat the planet bare.

[Narrator] The worldwide human population will rise to 9 billion by the year 2050. The global livestock population will double to 50 billion. It’s going to get crowded.

Schweisfurth: It has all been published in the Global Agriculture Report. That our current form of agriculture is destroying our means of subsistence, destroying the soil, exploiting the planet. We simply eat too much meat!

[Narrator] The growing consumption of meat accelerates climate change and species extinction; it damages the soil, water, and air – and it spurs global starvation! Appetizing, vacuum packaged portions of meat suggest none of this.

Dr. Vandana Shiva, Physicist, Alternative Nobel Laureate | India: Most of the grain that is being grown on the planet is not growing for food for human beings.

Tuttle: We are growing plenty of food to feed everyone. The problem is we are feeding most of that grain and the legumes like soybeans to animals while people are starving.

[Narrator] Worldwide, 1.8 billion people are starving. Every 6 seconds a child dies of malnutrition, that’s nearly 15,000 children a day! A sign of poverty – not for the poor, but for the rich!

Shiva: Only 2% of the soya in the United States is eaten by humans. About 70% goes for animal feed, about 28% is going for biofuel, diesel made from soybean. So it’s meat in the hunger of profits, not the hunger of people. Corn, about 10% of the corn in the world is been eaten by humans, most of it is going to torture animals, I don’t say feed animals because animals did not want to be fed with grain. It doesn’t suit their digestive systems. So we are talking about a system that is creating hunger on the planet in the name of feeding people.

[Narrator] Currently, one out of every three seeds of grain harvested in the world is used as animal feed. However, industrial nations can no longer produce these huge amounts of fodder themselves. Thus Europe already imports three quarters of its animal feed, including 35 million tons of soybeans alone – mainly from South America.
The land used for growing this feed does not consist of empty fields but valuable rain forests forced to yield to the monocultures of the agricultural corporations.

Goodall: One of the really shocking things about this desire of more and more people to eat more and more meat and to eat it more and more cheaply, is the awful effect that it is having on the environment: whole forests cleared to graze livestock or to grow grain to feed livestock. It’s having a shocking effect on the environment.

[Narrator] Because of this practice, over the past two decades roughly 20% of the worldwide largest rain forests in the Amazon Basin have been destroyed forever. Globally, deforestation irreversibly destroys an area the size of a soccer field every two seconds.
And this although tropical rain forests are among the Earth’s most valuable treasures. Nowhere else is there such a rich diversity of species. Moreover, these forests stabilize the world’s climate as enormous reservoirs of carbon dioxide. That makes them more valuable than meat!

Martin Hofstetter, Agricultural Expert for Greenpeace | Germany: There are statistics on the climate impact of meat. For example for 1 kg of beef roughly 12/13 kg of CO2 are produced. Converted to kilometers: In an economy car I can drive about 100 km, that corresponds to 1 kg of beef. Poultry and pork are about the same. About 50 km correspond to 1 kg of pork or poultry. With vegetables you end up with 600g, that’s only a few km. There is a huge damage to the climate caused by livestock farming or the impact of my meat consumption. To help the climate I should, of course, drive less, but I should also eat less meat.

[Narrator] Among the side effects of the meat and dairy industry is the production of methane gas. It is primarily generated in the stomachs of ruminants like cattle. Experts estimate that methane is 25 times more detrimental to the climate than CO2. An even greater concern than methane is nitrous oxide, which is nearly 300 times more harmful to the climate than CO2. It is released through the use of synthetic fertilizers. These and many other factors make animal agriculture a “catalyst” for climate change. There are increased reports of a new drought of the century, or a new flood of the century, a new storm of the century, or the progressive melting of the glaciers and the poles. Intensive animal farming doesn’t just stink to high heaven, the excrement produced is also polluting our soil! For each kilogram of meat produced, roughly six kilograms of slurry are generated. Among other things, slurry releases ammonia, which poisons the surrounding air and causes long-term damage to the soil. Not only that, slurry and its nitrates also threaten our drinking water … of which we need inordinate amounts to make animal products: … For one kilogram of eggs 3,300 liters are needed … … for one kilogram of chicken meat: 3,900 liters … … for one kilogram of pork: 4,800 liters … … for one kilogram of cheese: a whopping 5,000 liters… … and an all-time high of 15,500 liters are needed to produce one kilogram of beef! Plant production has a much better track record: Cultivating one kilogram of grain requires 1,300 liters of water … a farmer needs just 900 liters for a kilogram of potatoes … … and a kilogram of apples barely requires 700 liters of precious water.

Shiva: This entire meat-industry has today become a scandal on the planet. It should not exist in the form in which it exists. To force everyone into destroying the earth’s resources is a crime against the earth and it’s a crime against our bodies, because our bodies weren’t designed for this kind of diet. All together this is a recipe for a biological disaster, for biodiversity disaster, water disaster, climate disaster, health disaster.

Schweisfurth: This form of agriculture we have created for ourselves, basically over the past 50 years, cannot be maintained in this form. It can’t go well. Everyone with a mind to think, eyes to see and ears to hear knows this. And you wonder: Why isn’t anything changing?

Shiva: We were made to believe that meat-based-diets are superior to plant-based-diets, a lie that is been exposed by medical experts again and again and again. So what do we need to do? We need to bring diversity back into our farms, we need to bring harmony back into our farms. We have to celebrate diversity, we have to work with farmers, we have to know our farmers. We have to start realizing food is what keeps the world going, food is the energy of the world! And we have to know exactly where, in that chain, we entered, so that we don’t do more harm, we reduce the harm. And in the process we celebrate: “Food is life and life is food.”

[Narrator] Through its way of life the Langerhorst family in Upper Austria exemplifies the practice of farming without monocultures and intensive animal husbandry. It has been running a vegan organic farm with mixed cultivation and permaculture for more than 40 years. The family grows vegetables, fruit, berries, and nuts and avoids animal-based and chemical fertilizers, using green manure, plant-based compost, rock flour, mulch, and wood ash.

Plant-based agriculture has shown us that we can live very well from a small rather than a big farm. We only cultivate 3,5 hectares but as full-time farmers, and we are very grateful that this is possible and viable.

If you want to eat in an eco-friendly way, you should stick to plant-based food and choose local, seasonal, and organic products. That’s how it works.

[Narrator] Nature shows us how to solve our problems: our personal problems and the ones that involve the whole world. We just need to take action!

If we look at the chances according to human possibilities, human intelligence, human longing for good decent food – I think the chances are extremely high that we could all live on a good healthy, organic, plant-based diet.

“Until he extends his circle of compassion to all living things, man will not himself find peace.”
– Albert Schweitzer

[Narrator] We love the notion of romantic rural life. Happy animals in a healthy environment, well provided for by Mother Nature. It is really quite tempting to get this meat on your plate. But let’s face reality! – In the old days a farmer had 10 head of livestock, today they have hundreds or thousands. That means there is no longer a connection to the animal, it really is nothing but a commodity.

[Narrator] Meat is less expensive today than ever before, a cheap product. About 98% comes from factory farms, where conditions are beyond imagination. Rarely in the past has the term “industry” smacked of a contempt for life as it does today. – In the intensive animal farming industry animals are no longer seen as individuals, but as mere production goods, like tin cans, spare car parts, or as just things to be used with the aim of achieving the highest economic profit possible.

[Narrator] Chickens are by nature social, curious, and intelligent animals. But in the merciless factory farm their lives are reduced to – short and joyless – agony. Chicks hatch not in the maternal nest but in the incubator. As soon as they can stand, they are sorted, vaccinated, packed up, and sent to enormous feedlots. In these animal prisons they reach slaughtering weight in record time, never seeing daylight and under extremely crowded conditions. The normal life expectancy of a chicken is up to 20 years. Broilers only live up to 42 days. During this brief lifespan they must gain roughly 2 kilograms – no organism can withstand such brutally rapid growth. – The birds gain weight so quickly, that their skeletons cannot develop fast enough and the chickens as well as the turkeys end up lying flat on their breasts because their legs can no longer support the increasing weight.

[Narrator] Some animals don’t survive this abnormal growth. They can’t drag themselves to the feed and water troughs. Others die of breeding-induced cardiovascular diseases, they succumb to stress or fall victim to cannibalism. All these are facts we are often not aware of when eating meat and which the meat lobby is glad to keep concealed. This is a mother sow. This highly intelligent and extremely sensitive animal spends most of its life in crates – in cages hardly any larger than themselves. Instead of straw, they lie on bare concrete. – Movement is so restricted in the so-called cages that they can only move 20 to 30 cm forwards and 30 to 40 cm backwards. They can lie down, but they can’t turn around. The sows in modern intensive pig farming are not in “hog heaven”, that’s for sure.

[Narrator] In nature mother sows build big, soft nests for their offspring. In factory farms, however, this isn’t possible. The sows farrow in “gestation crates”. Confined, they are neither able to protect nor care for their young. Not long after birth, the piglets’ tails are docked as a precaution against cannibalism. In addition, male piglets are castrated by ripping out their testicles. Everything without pain relief because an object’s pain doesn’t matter! Many animals are born weak, handicapped, or sick. It is not “economical” to keep them alive. Their fate – an undignified and cold death. In the agonizing lack of space the immobilized mother sows sometimes crush their own offspring. At the age of three weeks the piglets are separated from their mother. What follows now: rearing and fattening. Although pigs can live up to 25 years, they are slaughtered as children – a mere 6 months old. They spend their brief lives in cramped quarters. EU norms require a minimum area of just 0.75 square meters for a porker of up to 110 kilograms. As many as 10% of the animals do not survive these conditions. In spite of this, only a few people are willing to do without a pork chop or a schnitzel. And cattle fare no better. Many animals spend their lives in narrow stalls. The lucky ones in open pens; many, however, vegetate in tether stalls. One step forward, one step backward. That is all the freedom of movement they have. A life expectancy of 30 years? That’s something industrial age cattle can only dream of.

These days there are huge, huge herds, and they continue to grow. Nobody notices anymore if a cow is sick, usually only the milk robot does, it detects that the milk output has gone down, or the other machine notices that the feed wasn’t eaten up. And that’s the only way it is even registered that one or more animals are sick.

[Narrator] Infections are one of the biggest problems in factory farms. The crowded conditions promote the rapid spread of bacteria. Overbreeding, a lack of hygiene, and ignoring natural needs put a huge burden on the health of the animals. The only antidote the industrial meat producer knows is the massive administering of drugs. Up to three quarters of all antibiotics end up in factory farms! – The system of factory farming is so sick that it needs antibiotics. If you took away the antibiotics, masses of animals would get sick and die. So the whole system is in itself completely sick.

[Narrator] The routine and improper use of antibiotics in factory farms presents a big health risk – not just for the animals because more and more bacteria strains are becoming resistant, which renders antibiotics ineffective. If these antibody-resistant bacteria ‘ infect humans, we get sick too. But often medication no longer works.

[Narrator] Globally, more than 700,000 people die from infections because the bacteria they have consumed has become resistant to antibiotics. But the animals are not only affected physically. Industrial farming harms them on all levels. – Since the beginning of mankind cruelty to animals has never been as prevalent as it is in our days. That applies to quantity as well as intensity.

Having once seen pigs in one of these intensive farms, I was so shocked. It’s unbelievable to me that people could treat animals as though they are just things without feelings. And so many people say to me, but they are being bred to eat, so it’s okay. But it’s not okay.

There is a lot of animal abuse in research, in education, in circuses, in rodeos, in zoos, but factory farming is the worst. If you summed up all the pain that we cause animals from industrial food preparation is far greater than all of the pain in any other venue combined. So it’s really the worst. It brings out the worst in human beings and it makes animals suffer greatly. They not only suffer their own pain, they also feel the pain of the other animals at these horrible factory farms.

[Narrator] Not only our meat consumption promotes the suffering of animals but also our growing demand for milk. Cows are forced to achieve higher and higher outputs: In the 60s a cow produced an annual average of 1,500 liters of milk, today that amount has risen to 10,000 and more!

I’ve quite a few vegetarian friends who consume dairy products and they believe this false idea that dairy products are a benign animal product, that there is no harm connected to milk because they figure: “Once a cow starts giving milk, she just gives milk.” And they don’t realize that cows can’t give adequate amount of milk for production unless they are pregnant. And cows have the same gestation period as humans – 9 months. They are pregnant 9 month and give birth. And within 24 hours max. 72 hours they take the calf away from the cow, because you need the milk for production. You know, it’s a terrible business, I mean there is more suffering in a glass of milk than you can find in just about anything. The calves will ball and ball and ball, the cows will just look for them.

[Narrator] Cows will often mourn their children for days or weeks. – They do miss their calves and the calves miss their mothers. It’s really a heartbreaking thing to watch.

[Narrator] In factory farms calves are being born constantly. But they serve no “useful” purpose – and are soon put to different “use”. – Let’s say a cow is alive for 4 years – she will have 4 calves. Just genetic roulette: 2 are going to be male and 2 are going to be female… the 2 males have no use to the dairy industry, they will go to auction within a day, to two or three days after birth, you’ll only need 1 female to replace the mum, so 3 out of 4 calves go to slaughter… right after they’re born.

We know in our bones that harming mothers who are just giving birth to babies and nursing those babies and nurturing those babies is something that is against our own compassion and kindness. And so when we are eating animal foods, eating dairy products, that’s exactly what we are doing: we are paying people to impregnate animals, steal their babies, steal their milk and then kill them.

I always say to people, especially women: Imagine that you was pregnant, you got your breasts ready to give milk and somebody took your baby away and then another animal came and took your milk. For human beings it’s almost impossible to imagine, but that’s what many animals go through. Some people think goat’s milk is better than cow’s milk… well the goat is also a living thing, the goat also produce milk not for the human consumption, but for the consumption of a little baby goat. And that’s who the milk should go to.

People wonder whether animals, including farm animals, have emotional lives. And the science tells us that they do. If people read and understand what Charles Darwin had to say about evolution, he said that the differences among species are shades of grey, not black and white. So if we have something, then they have it too, they being other animals. So the science tells us that many animals, including farm animals, have very rich and deep emotional lives.

The main thing is, these farm animals, when you know them as individuals, they are just wonderful, I mean there is nothing like hearing the whicker of a horse, when you come and he is pleased to see you. And the cows chewing the cud and the sweet breath that they have out in the field. The pigs, well pigs are as intelligent as dogs, and more intelligent than most. When I was a little girl, I used to want to have a little troupe of pigs and train them and go to a circus. Well, now I know a circus is a bad, but when I was a little girl – pigs are amazing, just incredible.

People want to think that cows are stupid, that they are dumb, that they are slow and all they do is eat grass. No, they have community, they have social structures, they babysit for each other, they mourn the loss of loved ones. They are a community just like any human community. They only look different, that’s all. We don’t speak their language, that’s the only difference. – We know for example that chickens display empathy, they feel the pain of other chickens. We know that cows and pigs are very smart, they miss one another, they love to be around with friends. Cows and pigs are extremely intelligent, they can learn very complex tasks. So, I like to say that the animals who we eat are very smart and they are very emotional. They are not “what” we eat. So, if there is an animal on a plate or at the end of a fork, it’s “who’s for dinner?”, not “what’s for dinner?”. Because when we use “who”, we are referring to an animal who has a very strong inner life and subjective life. So for example when pigs and cows and dogs and cats and wolves play, it’s very clear that they enjoy themselves and they are feeling happiness, they are feeling very gleeful, they are feeling a lot of pleasure.

Animals are fellow creatures, animals are living beings with feelings. They can show you when they are doing well. I can tell by looking at them, and I say: “Look children, animals can laugh when they are happy. And animals can show their sorrow when we treat them badly.” No animal gets onto the truck voluntarily. In the entire time I was a butcher it never happened. So we always drove the livestock by force out of the shed, by force onto the truck. Then we took it to the slaughterer or the butcher shop, and you have to imagine: Those are trucks with these days up to 100 head in the most cramped conditions. A stress situation, fear situation. You can tell, either the animals start to tremble or their eyes are so plain frightened.

Cattle prods, electroshock devices, clubs; pigs are dragged away by their ears, bulls are kicked in the balls to make them go, cows are kicked in their udders, the nose ring with bulls – if they’ve got one – with heavy bulls they twist it and turn the nose around almost 180 degrees to make them go. And all that involves pain, it is not without pain. Intense pain.

You can’t do it any other way, it’s simply not possible. You can’t think you’ve got countless animals and you’re going to persuade them nicely to get on the truck or up to the slaughtering bench. It doesn’t work. It’s always brutal. It’s always brutal!

[Narrator] Everyone is aware that animals have to die if we want to eat meat. But very few want to know what (actually) takes place in a slaughterhouse. Slaughterhouses have their reasons for not welcoming visitors. In large industrial slaughterhouses pigs are often stunned by machine. An electric shock triggers a kind of epileptic attack. This leads to unconsciousness. In smaller operations stunning by electric current is generally done by hand before the animals are suspended from a conveyor and their throats slashed.

Pig slaughtering in itself is so difficult even for people because the animals scream. They scream interminably. I used to say, it was as if little children were screaming. Why do children scream? They’re scared. With animals, it’s no different. In large meat factories gas chambers are standard practice. The pigs are herded into a gondola and lowered into a chamber where they are gassed with a mixture of carbon dioxide and air, leaving them unconscious.

CO2 stunning is a relatively cheap procedure. The advantage is, as with other gas-stunning methods, that several animals can be stunned at once, you don’t have to tear the group apart. The clear disadvantage of CO2 stunning, however, is that the animals do experience suffocation over a fairly long period of 15 to 20 seconds. They have a clear sense of not being able to breathe. The animals often reach upward, you hear them screaming.

[Narrator] Once they have been stunned, the pig’s throats must be quickly and properly slashed, otherwise the animals wake up and land in the cauldron of boiling water fully conscious. This is no uncommon occurrence since the whole process takes place so quickly. – As for the problem of slaughtering speed, one must note that at a rate of 750 pigs per hour the person sticking the pigs, the so-called sticker, has pretty much exactly 5 seconds to jab this knife into the animal’s neck. In that time he has to grab the pig, pull it into position by a foreleg, he has to take the knife out of the holder, and by then the 5 seconds are almost up. That means he has no chance to correct a badly placed stab, if he thinks he didn’t sever the major vessels or he missed some major vessels. That means, it’s definitely a problem in terms of bleeding effectiveness.

I’ve often seen how animals weren’t stunned properly. Pigs fleeing the vat of boiling water or jumping, trying to get out, where the slaughterer went over and used an iron rod to clobber it again. That is actually routine, it’s absolutely normal.

[Narrator] All pigs can meet this fate – animals from organic farms are no exception! Once it is cut into pieces, the animal has finally endured all the agony the industry has to offer. Chickens are processed fully automatically and at a high speed: On average 10,000 animals per hour can be stunned, killed, cleaned, and cut into parts in a modern slaughterhouse. Europe’s largest poultry slaughterhouse is in Germany. It can handle up to 27,000 animals an hour. That’s 432,000 chickens a day! The slaughter of cattle starts with a captive bolt stunner, which has been standard procedure for decades. The animals are driven along a chute into a narrow box. Not every animal goes to its death willingly.

In this stunning trap animals are shot with a so-called captive bolt gun. A bolt penetrates the skull and partially destroys the brain. The animals usually collapse immediately and are unconscious within fractions of a second. Problems can arise when the shot misses its mark, when the stunner isn’t placed properly, or the animal moves its head at the last moment, these are so-called missed shots, the animals are only slightly stunned or not at all. In terms of animal welfare this is critical because the second shot, which is inevitable, usually doesn’t work either because the skull is already open so now the intracranial pressure of the first shot cannot be reproduced, and I really can have difficulty effectively stunning the animal.

Why must humanity, the consumer, be shielded from the slaughterhouses? If it really is so right, then why? Cheese dairies don’t make you look away. Demonstration bakeries are common today too. But there isn’t a single demonstration slaughterhouse in the country. The onlookers would probably keel over by the score. Because it’s so brutal. Because it’s just plain violence. With cattle the rate of mis-stunning can be up to 9%, with pigs as high as 12,5%. Eventually you reach your limit. You either continue or stop. We had to slaughter calves, and the calf already balked at the door. I was supposed to shoot it and then a tear rolled out of its eye, and I fired the bolt gun in the air, said that was it, went to my boss, handed him the bolt gun, and told him I was done. He should send me my papers.

I was nothing more than the contract killer, the mercenary for all the people who wanted to eat meat. I took money and in exchange I killed the animal. And when I realized that, I quit. Worldwide 65 billion animals are slaughtered annually. That makes more than 2,000 animals per second.

[Narrator] Humans are creatures with many contradictions. What is especially paradoxical is our relationship to animals. We can adore a pet, and at the same time we let other animals be killed without the slightest compassion. Dr. Melanie Joy calls this phenomenon “carnism”. – Carnism teaches us to place animals in categories in our minds. Some animals we love – dogs and cats are our companions, our family members, our friends for instance – other animals we eat. Carnism teaches us to see animals as objects. So we learn to refer to the turkey on our plate as “something” rather than “someone”. And carnism teaches us to see animals as abstractions, as lacking any individuality or personality of their own. And instead simply as abstract members of a group about which we’ve made generalized assumptions. A pig is a pig, and all pigs are the same. Carnism, says Dr. Joy, is a belief system intended to prevent us from recognizing the violence and cruelty of the system behind eating animals. We suppress and deny, we ignore our head and our heart when it comes to animals that we classify as edible. – Choosing one animal to eat and one animal to be a pet is just like – people call it speciesism – it is a kind of racism, it’s a kind of favoritism and it’s a kind of just following a particular culture. Now, what we have to do is to build a culture and traditions based upon compassion.

The highest form of living, the highest value, is compassion. And when there is compassion, we maximize well-being. After all, the word wealth comes from wellbeing. It did not mean money in the hands of a few, it meant well-being shared across life’s spectrum.

I think once we admit that we humans are not the only beings with personality, minds and feelings, once we realize that we are part of the animal kingdom, then it becomes quiet as important how we treat animals, all animals, as how we treat each other. And so only when we show respect, consideration and concern for other living beings, can we imagine a world that’s more peaceful than the one today.

We are at a threshold where across the world people are seeking the liberation of life, from this strangle hold of objectification, the view that the earth is dead matter, and our beings are just objects. We have to rise in subject-hood, of an interconnected subject-hood, where no life is less important than any other life. And human beings are definitely not the emperors over the rest of life. We are just one strand in that web of life.

I think the reason that so many people don’t change their behaviour is, because they feel what’s the use? I’m just one person. So what I do actually can’t make any difference. Nor would it make any difference if it was just one. But more and more people are coming to understand what the problems are and what they ought to be doing. – Never ever think that one person can’t make a difference. We tend to focus our energies on looking for leaders, say like Martin Luther King or Mahatma Gandhi, but they were just one person. They didn’t set out in life to be a leader and they were very humble people. It’s just that circumstances in history drew them to the front. But if we are looking for leaders, all we have to do is to go home and look in the mirror. Because each one of us can make a difference. And we do. It’s just making a conscious decision that we are going to make a difference in our lives. We are not on this planet for a long time, so we need to do what we can in the time we have got to make a difference. To me it was always important to emphasize that we, as adults, are all role models. We have no control over this function. We can’t say: I don’t want to be a role model. Instead, we are taken as role models, whether by children, by relatives, by colleagues or friends. And I believe that the fact that we are taken as role models should motivate us to behave as such.

Every one of us can make a difference, every one of us eats at least two to three times a day. And every act of conscious eating, of knowing what the consequences of what you are eating are, knowing what you are eating, is an act of changing the world. – I think the most important message that I have, is to remember that you, and I’m speaking to you, watching this film, you make a difference! You as an individual make a difference… What you do each day actually is effecting what’s going on in the world each day. So your life matters, you matter and use your life wisely.