LeetCode - Algorithms - 476. Number Complement

Problem

476. Number Complement This question is the same as 1009

Java

naive

1
2
3
4
5
6
7
8
9
10
11
12
13
class Solution {
public int findComplement(int num) {
int r = 0;
String s = Integer.toBinaryString(num);
final int N = s.length();
char[] a = new char[N];
for (int i = 0; i < N; i++) {
a[i] = s.charAt(i) == '0' ? '1' : '0';
}
r = Integer.parseInt(String.valueOf(a),2);
return r;
}
}

Submission Detail

  • 149 / 149 test cases passed.
  • Runtime: 1 ms, faster than 35.06% of Java online submissions for Number Complement.
  • Memory Usage: 38.5 MB, less than 5.05% of Java online submissions for Number Complement.

2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class Solution {
public int findComplement(int num) {
String s = Integer.toBinaryString(num);
int r = 0;
final int N = s.length();
char[] a = s.toCharArray();
if (a[N - 1] == '0')
r = 1;
for (int i = N - 2; i >= 0; i--) {
if (a[i] == '0')
r += 2 << (N - 2 - i);
}
return r;
}
}

Submission Detail

  • 149 / 149 test cases passed.
  • Runtime: 1 ms, faster than 35.06% of Java online submissions for Number Complement.
  • Memory Usage: 37.7 MB, less than 18.78% of Java online submissions for Number Complement.

3

1
2
3
4
5
6
7
8
9
10
11
12
13
14
class Solution {
public int findComplement(int num) {
String s = Integer.toBinaryString(num);
int r = 0;
final int N = s.length();
if (s.charAt(N - 1) == '0')
r = 1;
for (int i = N - 2; i >= 0; i--) {
if (s.charAt(i) == '0')
r += 2 << (N - 2 - i);
}
return r;
}
}

Submission Detail

  • 149 / 149 test cases passed.
  • Runtime: 0 ms, faster than 100.00% of Java online submissions for Number Complement.
  • Memory Usage: 36.4 MB, less than 49.07% of Java online submissions for Number Complement.

4

1009. Complement of Base 10 Integer

1
2
3
4
5
6
7
8
9
10
11
12
13
14
class Solution {
public int bitwiseComplement(int N) {
String s = Integer.toBinaryString(N);
int r = 0;
final int LEN = s.length();
if (s.charAt(LEN - 1) == '0')
r = 1;
for (int i = LEN - 2; i >= 0; i--) {
if (s.charAt(i) == '0')
r += 2 << (LEN - 2 - i);
}
return r;
}
}

Submission Detail

  • 128 / 128 test cases passed.
  • Runtime: 0 ms, faster than 100.00% of Java online submissions for Complement of Base 10 Integer.
  • Memory Usage: 36.5 MB, less than 29.82% of Java online submissions for Complement of Base 10 Integer.

LeetCode - Algorithms - 66. Plus One

Problem

66. Plus One

Java

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
class Solution {
public int[] plusOne(int[] digits) {
final int N = digits.length;
List<Integer> list = new ArrayList<Integer>();
boolean carry = false;
int tmp = digits[N - 1] + 1;
if (tmp < 10) {
list.add(tmp);
} else {
list.add(tmp % 10);
carry = true;
}
if (N >= 2) {
for (int i = N - 2; i >= 0; i--) {
tmp = digits[i];
if (carry)
tmp++;
if (tmp < 10) {
carry = false;
list.add(tmp);
} else {
carry = true;
list.add(tmp % 10);
}
}
}
if (carry)
list.add(1);

final int LEN = list.size();
int[] a = new int[LEN];
for (int i = 0; i < LEN; i++) {
a[LEN - i - 1] = list.get(i).intValue();
}
return a;
}
}

Submission Detail

  • 109 / 109 test cases passed.
  • Runtime: 1 ms, faster than 17.94% of Java online submissions for Plus One.
  • Memory Usage: 39.9 MB, less than 5.08% of Java online submissions for Plus One.

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
class Solution {
public int[] plusOne(int[] digits) {
final int N = digits.length;
List<Integer> list = new ArrayList<Integer>();
boolean carry = false;
int tmp = digits[N - 1] + 1;
if (tmp < 10) {
list.add(tmp);
} else {
list.add(tmp - 10);
carry = true;
}
for (int i = N - 2; i >= 0; i--) {
tmp = digits[i];
if (carry)
tmp++;
if (tmp < 10) {
carry = false;
list.add(tmp);
} else {
carry = true;
list.add(tmp - 10);
}
}
if (carry)
list.add(1);

final int LEN = list.size();
int[] a = new int[LEN];
for (int i = 0; i < LEN; i++) {
a[LEN - i - 1] = list.get(i).intValue();
}
return a;
}
}

Submission Detail

  • 109 / 109 test cases passed.
  • Runtime: 1 ms, faster than 17.94% of Java online submissions for Plus One.
  • Memory Usage: 38.4 MB, less than 20.96% of Java online submissions for Plus One.

3

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
class Solution {
public int[] plusOne(int[] digits) {
final int N = digits.length;
int[] a2 = new int[N];
boolean carry = false;
int tmp = digits[N - 1] + 1;
if (tmp < 10) {
a2[N - 1] = (tmp);
} else {
a2[N - 1] = tmp - 10;
carry = true;
}
for (int i = N - 2; i >= 0; i--) {
tmp = digits[i];
if (carry)
tmp++;
if (tmp < 10) {
carry = false;
a2[i] = tmp;
} else {
carry = true;
a2[i] = tmp - 10;
}
}
if (carry) {
int[] a1 = new int[N + 1];
a1[0] = 1;
System.arraycopy(a2, 0, a1, 1, N);
return a1;
} else
return a2;
}
}

Submission Detail

  • 109 / 109 test cases passed.
  • Runtime: 0 ms, faster than 100.00% of Java online submissions for Plus One.
  • Memory Usage: 39.6 MB, less than 8.37% of Java online submissions for Plus One.

LeetCode - Algorithms - 1486. XOR Operation in an Array

Problem

1486. XOR Operation in an Array

Java

1
2
3
4
5
6
7
8
9
10
class Solution {
public int xorOperation(int n, int start) {
int r = start;
for (; n > 1; n--) {
start += 2;
r = r ^ start;
}
return r;
}
}

Submission Detail

  • 54 / 54 test cases passed.
  • Runtime: 0 ms, faster than 100.00% of Java online submissions for XOR Operation in an Array.
  • Memory Usage: 38.3 MB, less than 100.00% of Java online submissions for XOR Operation in an Array.

LeetCode - Algorithms - 1480. Running Sum of 1d Array

Problem

1480. Running Sum of 1d Array

Java

1

1
2
3
4
5
6
7
8
9
10
11
class Solution {
public int[] runningSum(int[] nums) {
int[] a = new int[nums.length];
for (int i = 0; i < nums.length; i++) {
for (int j = 0; j <= i; j++) {
a[i] += nums[j];
}
}
return a;
}
}

Submission Detail

  • 53 / 53 test cases passed.
  • Runtime: 5 ms, faster than 5.83% of Java online submissions for Running Sum of 1d Array.
  • Memory Usage: 41.2 MB, less than 50.00% of Java online submissions for Running Sum of 1d Array.

2

1
2
3
4
5
6
7
8
9
10
class Solution {
public int[] runningSum(int[] nums) {
int[] a = new int[nums.length];
a[0] = nums[0];
for (int i = 1; i < nums.length; i++) {
a[i] = a[i - 1] + nums[i];
}
return a;
}
}

Submission Detail

  • 53 / 53 test cases passed.
  • Runtime: 1 ms, faster than 10.26% of Java online submissions for Running Sum of 1d Array.
  • Memory Usage: 40.7 MB, less than 50.00% of Java online submissions for Running Sum of 1d Array.

3

1
2
3
4
5
6
7
8
9
10
11
class Solution {
public int[] runningSum(int[] nums) {
final int N = nums.length;
int[] a = new int[N];
a[0] = nums[0];
for (int i = 1; i < N; i++) {
a[i] = a[i - 1] + nums[i];
}
return a;
}
}

Submission Detail

  • 53 / 53 test cases passed.
  • Runtime: 0 ms, faster than 100.00% of Java online submissions for Running Sum of 1d Array.
  • Memory Usage: 40.6 MB, less than 50.00% of Java online submissions for Running Sum of 1d Array.

LeetCode - Algorithms - 1342. Number of Steps to Reduce a Number to Zero

Problem

1342. Number of Steps to Reduce a Number to Zero

Java

1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
class Solution {
public int numberOfSteps (int num) {
int i = 0;
while (num > 0) {
if ((num & 1) == 1) {
num--;
} else {
num = num >> 1;
}
i++;
}
return i;
}
}

Submission Detail

  • 204 / 204 test cases passed.
  • Runtime: 1 ms, faster than 19.49% of Java online submissions for Number of Steps to Reduce a Number to Zero.
  • Memory Usage: 38 MB, less than 11.94% of Java online submissions for Number of Steps to Reduce a Number to Zero.

2

1
2
3
4
5
6
7
8
9
10
11
12
13
class Solution {
public int numberOfSteps (int num) {
int i = 0;
for (; num > 0; i++) {
if ((num & 1) == 1) {
num--;
} else {
num = num >> 1;
}
}
return i;
}
}

Submission Detail

  • 204 / 204 test cases passed.
  • Runtime: 0 ms, faster than 100.00% of Java online submissions for Number of Steps to Reduce a Number to Zero.
  • Memory Usage: 38.2 MB, less than 6.92% of Java online submissions for Number of Steps to Reduce a Number to Zero.

United States Declaration of Independence

1823 facsimile of the engrossed copy

In CONGRESS, July 4, 1776.
The unanimous Declaration of the thirteen united States of America,

When in the Course of human events, it becomes necessary for one people to dissolve the political bands which have connected them with another, and to assume among the powers of the earth, the separate and equal station to which the Laws of Nature and of Nature’s God entitle them, a decent respect to the opinions of mankind requires that they should declare the causes which impel them to the separation.

We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness.–That to secure these rights, Governments are instituted among Men, deriving their just powers from the consent of the governed,–That whenever any Form of Government becomes destructive of these ends, it is the Right of the People to alter or to abolish it, and to institute new Government, laying its foundation on such principles and organizing its powers in such form, as to them shall seem most likely to effect their Safety and Happiness. Prudence, indeed, will dictate that Governments long established should not be changed for light and transient causes; and accordingly all experience hath shewn, that mankind are more disposed to suffer, while evils are sufferable, than to right themselves by abolishing the forms to which they are accustomed. But when a long train of abuses and usurpations, pursuing invariably the same Object evinces a design to reduce them under absolute Despotism, it is their right, it is their duty, to throw off such Government, and to provide new Guards for their future security.

Such has been the patient sufferance of these Colonies; and such is now the necessity which constrains them to alter their former Systems of Government. The history of the present King of Great Britain is a history of repeated injuries and usurpations, all having in direct object the establishment of an absolute Tyranny over these States. To prove this, let Facts be submitted to a candid world.

He has refused his Assent to Laws, the most wholesome and necessary for the public good.

He has forbidden his Governors to pass Laws of immediate and pressing importance, unless suspended in their operation till his Assent should be obtained; and when so suspended, he has utterly neglected to attend to them.

He has refused to pass other Laws for the accommodation of large districts of people, unless those people would relinquish the right of Representation in the Legislature, a right inestimable to them and formidable to tyrants only.

He has called together legislative bodies at places unusual, uncomfortable, and distant from the depository of their Public Records, for the sole purpose of fatiguing them into compliance with his measures.

He has dissolved Representative Houses repeatedly, for opposing with manly firmness of his invasions on the rights of the people.

He has refused for a long time, after such dissolutions, to cause others to be elected, whereby the Legislative Powers, incapable of Annihilation, have returned to the People at large for their exercise; the State remaining in the meantime exposed to all the dangers of invasion from without, and convulsions within.

He has endeavoured to prevent the population of these States; for that purpose obstructing the Laws for Naturalization of Foreigners; refusing to pass others to encourage their migrations hither, and raising the conditions of new Appropriations of Lands.

He has obstructed the Administration of Justice by refusing his Assent to Laws for establishing Judiciary Powers.

He has made Judges dependent on his Will alone for the tenure of their offices, and the amount and payment of their salaries.

He has erected a multitude of New Offices, and sent hither swarms of Officers to harass our people and eat out their substance.

He has kept among us, in times of peace, Standing Armies without the Consent of our legislatures.

He has affected to render the Military independent of and superior to the Civil Power.

He has combined with others to subject us to a jurisdiction foreign to our constitution, and unacknowledged by our laws; giving his Assent to their Acts of pretended Legislation:

For quartering large bodies of armed troops among us:

For protecting them, by a mock Trial from punishment for any Murders which they should commit on the Inhabitants of these States:

For cutting off our Trade with all parts of the world:

For imposing Taxes on us without our Consent:

For depriving us in many cases, of the benefit of Trial by Jury:

For transporting us beyond Seas to be tried for pretended offences:

For abolishing the free System of English Laws in a neighbouring Province, establishing therein an Arbitrary government, and enlarging its Boundaries so as to render it at once an example and fit instrument for introducing the same absolute rule into these Colonies:

For taking away our Charters, abolishing our most valuable Laws and altering fundamentally the Forms of our Governments:

For suspending our own Legislatures, and declaring themselves invested with power to legislate for us in all cases whatsoever.

He has abdicated Government here, by declaring us out of his Protection and waging War against us.

He has plundered our seas, ravaged our coasts, burnt our towns, and destroyed the lives of our people.

He is at this time transporting large Armies of foreign Mercenaries to compleat the works of death, desolation, and tyranny, already begun with circumstances of Cruelty & Perfidy scarcely paralleled in the most barbarous ages, and totally unworthy the Head of a civilized nation.

He has constrained our fellow Citizens taken Captive on the high Seas to bear Arms against their Country, to become the executioners of their friends and Brethren, or to fall themselves by their Hands.

He has excited domestic insurrections amongst us, and has endeavoured to bring on the inhabitants of our frontiers, the merciless Indian Savages whose known rule of warfare, is an undistinguished destruction of all ages, sexes and conditions.

In every stage of these Oppressions We have Petitioned for Redress in the most humble terms: Our repeated Petitions have been answered only by repeated injury. A Prince, whose character is thus marked by every act which may define a Tyrant, is unfit to be the ruler of a free people.

Nor have We been wanting in attentions to our British brethren. We have warned them from time to time of attempts by their legislature to extend an unwarrantable jurisdiction over us. We have reminded them of the circumstances of our emigration and settlement here. We have appealed to their native justice and magnanimity, and we have conjured them by the ties of our common kindred to disavow these usurpations, which, would inevitably interrupt our connections and correspondence. They too have been deaf to the voice of justice and of consanguinity. We must, therefore, acquiesce in the necessity, which denounces our Separation, and hold them, as we hold the rest of mankind, Enemies in War, in Peace Friends.

We, therefore, the Representatives of the united States of America, in General Congress, Assembled, appealing to the Supreme Judge of the world for the rectitude of our intentions, do, in the Name, and by Authority of the good People of these Colonies, solemnly publish and declare, That these united Colonies are, and of Right ought to be Free and Independent States; that they are Absolved from all Allegiance to the British Crown, and that all political connection between them and the State of Great Britain, is and ought to be totally dissolved; and that as Free and Independent States, they have full Power to levy War, conclude Peace, contract Alliances, establish Commerce, and to do all other Acts and Things which Independent States may of right do. And for the support of this Declaration, with a firm reliance on the protection of divine Providence, we mutually pledge to each other our Lives, our Fortunes and our sacred Honor.

New Hampshire: Josiah Bartlett, William Whipple, Matthew Thornton
Massachusetts: Samuel Adams, John Adams, John Hancock, Robert Treat Paine, Elbridge Gerry
Rhode Island: Stephen Hopkins, William Ellery
Connecticut: Roger Sherman, Samuel Huntington, William Williams, Oliver Wolcott
New York: William Floyd, Philip Livingston, Francis Lewis, Lewis Morris
New Jersey: Richard Stockton, John Witherspoon, Francis Hopkinson, John Hart, Abraham Clark
Pennsylvania: Robert Morris, Benjamin Rush, Benjamin Franklin, John Morton, George Clymer, James Smith, George Taylor, James Wilson, George Ross
Delaware: George Read, Caesar Rodney, Thomas McKean
Maryland: Samuel Chase, William Paca, Thomas Stone, Charles Carroll of Carrollton
Virginia: George Wythe, Richard Henry Lee, Thomas Jefferson, Benjamin Harrison, Thomas Nelson Jr., Francis Lightfoot Lee, Carter Braxton
North Carolina: William Hooper, Joseph Hewes, John Penn
South Carolina: Edward Rutledge, Thomas Heyward Jr., Thomas Lynch Jr., Arthur Middleton
Georgia: Button Gwinnett, Lyman Hall, George Walton


LeetCode - Algorithms - 149. Max Points on a Line

Problem

149. Max Points on a Line

Java

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
48
49
50
51
52
53
54
55
56
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;

class Solution {
public int maxPoints(int[][] points) {
int n = 0;
for (int i = 0; i < points.length; i++) {
int m = maxCollinearPoints(points, i);
if (m > n)
n = m;
}
return n;
}

private int maxCollinearPoints(int[][] points, int idx) {
Map<BigDecimal, Integer> map = new HashMap<BigDecimal, Integer>();
int x0 = points[idx][0];
int y0 = points[idx][1];
int x = 0, y = 0;
int duplicate = 1;
int vertical = 0;
for (int i = 0; i < points.length; i++) {
if (i != idx) {
x = points[i][0];
y = points[i][1];
if (x == x0) {
if (y == y0) {
duplicate++;
}
else {
vertical++;
}
} else {
BigDecimal deltaY = BigDecimal.valueOf(y - y0);
BigDecimal deltaX = BigDecimal.valueOf(x - x0);
BigDecimal slope = deltaY.divide(deltaX, 16, RoundingMode.FLOOR);
if (map.containsKey(slope)) {
map.put(slope, map.get(slope) + 1);
} else {
map.put(slope, 1);
}
}

}
}
int max = 0;
for (Integer num : map.values()) {
if (num + duplicate > max)
max = num + duplicate;
}
if ( (vertical + duplicate) > max )
max = vertical + duplicate;
return max;
}
}

Submission Detail

  • 41 / 41 test cases passed.
  • Runtime: 14 ms, faster than 72.08% of Java online submissions for Max Points on a Line.
  • Memory Usage: 39.6 MB, less than 41.21% of Java online submissions for Max Points on a Line.

programcreek

© https://www.programcreek.com/2014/04/leetcode-max-points-on-a-line-java/

This problem can be solve by counting points that have the same slope for each point. When counting, we need to be careful about the duplicate points and points on the vertical lines.

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
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;

class Solution {
public int maxPoints(int[][] points) {
HashMap<BigDecimal, Integer> result = new HashMap<BigDecimal, Integer>();
int max = 0;

for (int i = 0; i < points.length; i++) {
int duplicate = 1;
int vertical = 0;
for (int j = i + 1; j < points.length; j++) {
//handle duplicates and vertical
if (points[i][0] == points[j][0]) {
if (points[i][1] == points[j][1]) {
duplicate++;
} else {
vertical++;
}
} else {
BigDecimal slope =
points[j][1] == points[i][1] ? BigDecimal.valueOf(0.0) : BigDecimal.valueOf(1.0 * (points[j][1] - points[i][1])).divide(BigDecimal.valueOf(points[j][0] - points[i][0]), 16,
RoundingMode.FLOOR);
if (result.get(slope) != null) {
result.put(slope, result.get(slope) + 1);
} else {
result.put(slope, 1);
}
}
}

for (Integer count : result.values()) {
if (count + duplicate > max) {
max = count + duplicate;
}
}

max = Math.max(vertical + duplicate, max);
result.clear();
}

return max;
}
}

Submission Detail

  • 41 / 41 test cases passed.
  • Runtime: 25 ms, faster than 42.00% of Java online submissions for Max Points on a Line.
  • Memory Usage: 40.4 MB, less than 20.64% of Java online submissions for Max Points on a Line.

How to get back to work after a career break - Carol Fishman Cohen - TEDxBeaconStreet - Transcript

People returning to work after a career break: I call them relaunchers. These are people who have taken career breaks for elder care, for childcare reasons, pursuing a personal interest or a personal health issue. Closely related are career transitioners of all kinds: veterans, military spouses, retirees coming out of retirement or repatriating expats. Returning to work after a career break is hard because of a disconnect between the employers and the relaunchers. Employers can view hiring people with a gap on their resume as a high-risk proposition, and individuals on career break can have doubts about their abilities to relaunch their careers, especially if they’ve been out for a long time. This disconnect is a problem that I’m trying to help solve.

Now, successful relaunchers are everywhere and in every field. This is Sami Kafala. He’s a nuclear physicist in the UK who took a five-year career break to be home with his five children. The Singapore press recently wrote about nurses returning to work after long career breaks. And speaking of long career breaks, this is Mimi Kahn. She’s a social worker in Orange County, California, who returned to work in a social services organization after a 25-year career break. That’s the longest career break that I’m aware of. Supreme Court Justice Sandra Day O’Connor took a five-year career break early in her career.

And this is Tracy Shapiro, who took a 13-year career break. Tracy answered a call for essays by the Today Show from people who were trying to return to work but having a difficult time of it. Tracy wrote in that she was a mom of five who loved her time at home, but she had gone through a divorce and needed to return to work, plus she really wanted to bring work back into her life because she loved working. Tracy was doing what so many of us do when we feel like we’ve put in a good day in the job search. She was looking for a finance or accounting role, and she had just spent the last nine months very diligently researching companies online and applying for jobs with no results.

I met Tracy in June of 2011, when the Today Show asked me if I could work with her to see if I could help her turn things around. The first thing I told Tracy was she had to get out of the house. I told her she had to go public with her job search and tell everyone she knew about her interest in returning to work. I also told her, “You are going to have a lot of conversations that don’t go anywhere. Expect that, and don’t be discouraged by it. There will be a handful that ultimately lead to a job opportunity.”

I’ll tell you what happened with Tracy in a little bit, but I want to share with you a discovery that I made when I was returning to work after my own career break of 11 years out of the full-time workforce. And that is, that people’s view of you is frozen in time. What I mean by this is, when you start to get in touch with people and you get back in touch with those people from the past, the people with whom you worked or went to school, they are going to remember you as you were before your career break. And that’s even if your sense of self has diminished over time, as happens with so many of us the farther removed we are from our professional identities. So for example, you might think of yourself as someone who looks like this. This is me, crazy after a day of driving around in my minivan. Or here I am in the kitchen. But those people from the past, they don’t know about any of this. They only remember you as you were, and it’s a great confidence boost to be back in touch with these people and hear their enthusiasm about your interest in returning to work.

There’s one more thing I remember vividly from my own career break. And that was that I hardly kept up with the business news. My background is in finance, and I hardly kept up with any news when I was home caring for my four young children. So I was afraid I’d go into an interview and start talking about a company that didn’t exist anymore. So I had to resubscribe to the Wall Street Journal and read it for a good six months cover to cover before I felt like I had a handle on what was going on in the business world again.

I believe relaunchers are a gem of the workforce, and here’s why. Think about our life stage: for those of us who took career breaks for childcare reasons, we have fewer or no maternity leaves. We did that already. We have fewer spousal or partner job relocations. We’re in a more settled time of life. We have great work experience. We have a more mature perspective. We’re not trying to find ourselves at an employer’s expense. Plus we have an energy, an enthusiasm about returning to work precisely because we’ve been away from it for a while.

On the flip side, I speak with employers, and here are two concerns that employers have about hiring relaunchers.

The first one is, employers are worried that relaunchers are technologically obsolete. Now, I can tell you, having been technologically obsolete myself at one point, that it’s a temporary condition. I had done my financial analysis so long ago that I used Lotus 1-2-3. I don’t know if anyone can even remember back that far, but I had to relearn it on Excel. It actually wasn’t that hard. A lot of the commands are the same. I found PowerPoint much more challenging, but now I use PowerPoint all the time. I tell relaunchers that employers expect them to come to the table with a working knowledge of basic office management software. And if they’re not up to speed, then it’s their responsibility to get there. And they do.

The second area of concern that employers have about relaunchers is they’re worried that relaunchers don’t know what they want to do. I tell relaunchers that they need to do the hard work to figure out whether their interests and skills have changed or have not changed while they have been on career break. That’s not the employer’s job. It’s the relauncher’s responsibility to demonstrate to the employer where they can add the most value.

Back in 2010 I started noticing something. I had been tracking return to work programs since 2008, and in 2010, I started noticing the use of a short-term paid work opportunity, whether it was called an internship or not, but an internship-like experience, as a way for professionals to return to work. I saw Goldman Sachs and Sara Lee start corporate reentry internship programs. I saw a returning engineer, a nontraditional reentry candidate, apply for an entry-level internship program in the military, and then get a permanent job afterward. I saw two universities integrate internships into mid-career executive education programs.

So I wrote a report about what I was seeing, and it became this article for Harvard Business Review called “The 40-Year-Old Intern.” I have to thank the editors there for that title, and also for this artwork where you can see the 40-year-old intern in the midst of all the college interns. And then, courtesy of Fox Business News, they called the concept “The 50-Year-Old Intern.”

(Laughter)

So five of the biggest financial services companies have reentry internship programs for returning finance professionals. And at this point, hundreds of people have participated. These internships are paid, and the people who move on to permanent roles are commanding competitive salaries. And now, seven of the biggest engineering companies are piloting reentry internship programs for returning engineers as part of an initiative with the Society of Women Engineers. Now, why are companies embracing the reentry internship? Because the internship allows the employer to base their hiring decision on an actual work sample instead of a series of interviews, and the employer does not have to make that permanent hiring decision until the internship period is over. This testing out period removes the perceived risk that some managers attach to hiring relaunchers, and they are attracting excellent candidates who are turning into great hires.

Think about how far we have come. Before this, most employers were not interested in engaging with relaunchers at all. But now, not only are programs being developed specifically with relaunchers in mind, but you can’t even apply for these programs unless you have a gap on your résumé.

This is the mark of real change, of true institutional shift, because if we can solve this problem for relaunchers, we can solve it for other career transitioners too. In fact, an employer just told me that their veterans return to work program is based on their reentry internship program. And there’s no reason why there can’t be a retiree internship program. Different pool, same concept.

So let me tell you what happened with Tracy Shapiro. Remember that she had to tell everyone she knew about her interest in returning to work. Well, one critical conversation with another parent in her community led to a job offer for Tracy, and it was an accounting job in a finance department. But it was a temp job. The company told her there was a possibility it could turn into something more, but no guarantees. This was in the fall of 2011. Tracy loved this company, and she loved the people and the office was less than 10 minutes from her house. So even though she had a second job offer at another company for a permanent full-time role, she decided to take her chances with this internship and hope for the best. Well, she ended up blowing away all of their expectations, and the company not only made her a permanent offer at the beginning of 2012, but they made it even more interesting and challenging, because they knew what Tracy could handle.

Fast forward to 2015, Tracy’s been promoted. They’ve paid for her to get her MBA at night. She’s even hired another relauncher to work for her. Tracy’s temp job was a tryout, just like an internship, and it ended up being a win for both Tracy and her employer.

Now, my goal is to bring the reentry internship concept to more and more employers. But in the meantime, if you are returning to work after a career break, don’t hesitate to suggest an internship or an internship-like arrangement to an employer that does not have a formal reentry internship program. Be their first success story, and you can be the example for more relaunchers to come.

Thank you.

All the world's a stage

by William Shakespeare

All the world’s a stage,
And all the men and women merely players;
They have their exits and their entrances,
And one man in his time plays many parts,
His acts being seven ages. At first, the infant,
Mewling and puking in the nurse’s arms.
Then the whining schoolboy, with his satchel
And shining morning face, creeping like snail
Unwillingly to school. And then the lover,
Sighing like furnace, with a woeful ballad
Made to his mistress’ eyebrow. Then a soldier,
Full of strange oaths and bearded like the pard,
Jealous in honour, sudden and quick in quarrel,
Seeking the bubble reputation
Even in the cannon’s mouth. And then the justice,
In fair round belly with good capon lined,
With eyes severe and beard of formal cut,
Full of wise saws and modern instances;
And so he plays his part. The sixth age shifts
Into the lean and slippered pantaloon,
With spectacles on nose and pouch on side;
His youthful hose, well saved, a world too wide
For his shrunk shank, and his big manly voice,
Turning again toward childish treble, pipes
And whistles in his sound. Last scene of all,
That ends this strange eventful history,
Is second childishness and mere oblivion,
Sans teeth, sans eyes, sans taste, sans everything.


“All the world’s a stage” is the phrase that begins a monologue from William Shakespeare’s pastoral comedy As You Like It, spoken by the melancholy Jaques in Act II Scene VII Line 139. The speech compares the world to a stage and life to a play and catalogues the seven stages of a man’s life, sometimes referred to as the seven ages of man.