Saturday, July 4, 2020

COVID-19: Canada layoff tracker

Here is the link.

Calgary Stampede: The Greatest Outdoor Show on Earth temporarily cut 900 staff, or 80 per cent of its workforce.
General Motors: Announced all production will be suspended, impacting 4,000 jobs.
Ford Motors Co: Shut down all production in Canada, affecting 6,900 workers.
Toyota Motor Corp: Suspended all operations in Canada affecting 8,000 workers.
LNG Canada: The company behind liquified natural gas project in Kitimat, B.C. laid off 750 workers, half its staff.
Porter Airlines: Suspended all flights and laid off most of its 1,400 workforce.
Cirque du Soleil: Quebec circus entertainment giant suspended all shows and lays off 95 per cent of its workforce, or 4,679 people.
Fiat Chrysler: Suspended operations and lays off 8,900 workers.
Irving Shipbuilding: Suspended operations at its Halifax shipyard and lays off 1,370 workers.
Air Canada: The carrier said on March 20 it would lay off 5,150 flight attendants, followed by a decision to put 600 of its 4,400 pilots on unpaid leave. On March 30 Air Canada said it would lay off an additional 16,500 employees effective April 3. UPDATE: On April 8 the Toronto Star reported the company will rehire 16,000 workers by taking advantage of Ottawa’s 75 per cent wage subsidy.
Banff Centre for Arts and Creativity: Temporarily laid off 400 staff, about 75 per cent of its workforce.
Stratford Festival: Laid off nearly 500 employees after cancelling all shows until May 2.
Freshii: Restaurant chain closed all locations and lays off “hundreds” of employees.
Stratford Festival: Issued 500 temporary layoff notices.
Cineplex: Theatre giant laid off all part-time staff, roughly 11,000 jobs, some of whom are hired by Sobeys grocery chain to meet demand.
Transat: Airline laid off 3,600 staff, about 70 per cent of its workforce.
Bombardier: Quebec transportation giant laid off 12,400 workers in Canada.
City of Saskatoon: Laid off 126 temporary staff.
La Co-operative nationale de l’information independante: Quebec newspaper chain laid off 143 staff.
New Flyer Industries: Winnipeg-based bus maker temporarily laid off 6,500 employees and permanently cuts 300 jobs.
Quebec City: Laid off 2,000 city workers.
Saltwire Network: Atlantic Canada media chain laid off 250 workers.
WestJet: Airline laid off 6,900 of its workers. Update April 9: Rehiring 6,400 employees because of federal wage subsidy. Update April 16: Will lay off 1,700 pilots between May 1 and June 1.
White Spot: B.C.-based restaurant chain laid off 3,000 workers.
Airbus: The French aircraft manufacturer laid off 1,400 workers, half its workforce in Mirabel, Que where it builds the A220 aircraft.
Leon’s: Furniture retailer shut its Leon’s and The Brick stores and lays off 3,900 workers.
TC Transcontinental: Laid off 1,600 people in its printing unit.
Vancouver Aquarium: A week after closing its doors, laid off 343 employees, or 60 per cent of its workforce.
Resort Municipality of Whistler: Laid off 200 casual and auxiliary staff.
Steve Nash Fitness World: Fitness chain shut down and terminates roughly 1,200 employees.
Indigo Books & Music: Laid off 5,200 staff, or about 75 per cent of its workforce. Update: On April 13 Indigo said it is rehiring 545 workers.
Boston Pizza International: Laid off half of its 192 corporate staff and said franchised restaurants have made similar cuts.
Sunwing: Airline laid off 1,063 flight attendants and 470 pilots.
Calgary YMCA: Laid off 1,400 staff amid closure of all facilities.
Casinos Regina and Moosejaw: Will lay off 550 staff as of April 3.
Lush: Laid off an undisclosed number of employees at its 258 cosmetic stores across North America.
Province of Alberta: Redirected $128 million in education funding to Covid-19, forcing the lay off of more than 20,000 support staff life substitute teachers and educational assistants.
Reitmans (Canada) Ltd:  Laying off 90 per cent of its retail store employees and 30 per cent of head office staff. Reitmans has 7,000 employees in total.
Palliser Furniture: The Winnipeg company laid off 72 per cent of its workforce, or around 2,200 employees. 
City of Edmonton: Will lay off 2,000 non-essential staff including recreation and library employees as of April 14. Update April 27: Laid off 900 more staff.
City of Calgary: Will lay off 1,200 part-time and casual staff, though exact numbers haven’t been made public.
City of Regina: Laid off 360 casual employees and postponed the recall of 500 seasonal jobs.
Gap Inc: Laid off 80,000 employees in Canada and the U.S.
Mullen Group: The oilfield services and trucking company expects to give short-term lay off notices to half its 6,100 workers.
Canada’s restaurant industry: A survey by Restaurants Canada of its members found 800,000 restaurant jobs have been cut since March 1.
City of Windsor, Ont.: Laid off 500 city employees.
Ritual: The food ordering and pickup app laid off half its staff, or around 200 workers.
City of Vancouver: Laid off 1,500 employees, mostly at community centres, theatres and libraries.
City of Guelph, Ont.: Laid off 600 casual and part-time employees.
City of Mississauga, Ont.: Laid off 2,000 part-time and non-essential employees.
City of Ottawa: Laid off 4,280 part-time city workers.
City of Kamloops, B.C.: Laid off 100 staff.
City of Thunder Bay, Ont.: Laid off one-third of its workforce.
Mogo: The Vancouver fintech laid off 30 per cent of its staff, or around 80 people.
City of Delta, B.C.: Laid off 500 employees from its parks and recreation and infrastructure departments.
City of Surrey, B.C.: Laid off 2,000 employees, including recreation and library staff.
City of Waterloo, Ont.: Laid off 430 part-time staff.
Canopy Growth: Cannabis producer laid off 200 retail workers. Update April 30: Laying off another 200 people across its operations.
City of Cambridge, Ont.: Laid off 400 part-time staff.
BC Ferries: Cancelled all routes and laid off 1,400 staff. Update April 14: The company has rescinded the layoffs while determining if it qualifies for Ottawa’s emergency wage subsidy.
CAE Inc: The flight training company laid off 2,600 employees, roughly a quarter of its workforce, and reduced hours for 900 workers. Update April 21: CAE recalled 1,500 laid-off employees.
City of Barrie, Ont.: Laying off 470 part-time theatre and recreation staff.
Vancouver Bard on the Beach festival: Cancelled its 2020 season, resulting in the loss of 240 jobs.
Torstar: Publisher of the Toronto Star eliminated 85 positions amid a collapse in ad revenue.
City of Kitchener, Ont. Laid off 842 casual and part-time workers.
Organigram Holdings: Cannabis producer laying off 45 per cent of workforce, or about 400 jobs.
Royal Ontario Museum: Laid off half its 323 full-time staff and put remainder on reduced hours.
Strathcona County, Alta.: Laid off 500 employees working in recreation, parks and culture.
Canadian auto dealers: A survey by the Canadian Automobile Dealers Association of its members found 96 per cent have laid off employees. Of 862 dealerships that responded to the survey, 76 per cent had laid off 10 or more people, equal to at least 6,500 jobs.
City of Kawartha Lakes, Ont.: Laid off 200 part-time and contract staff.
City of Peterborough, Ont.: Laid off 326 mostly part-time workers.
City of Winnipeg: Laid off close to 700 workers.
City of Gatineau, Que.: In second round of job action it is laying off 160 employees, bringing its total to more than 700.
Fast Trucking Service: Saskatchewan oil services company 250 of its 350 employees.
Burnaby, B.C.: City laying off 1,500 workers in the parks and recreation department.
Shaw Communications: Laying off 10 per cent of its staff, or around 1,000 people.
Halifax Regional Municipality: Will lay off 1,500 casual, temporary and seasonal employees.
Cargill meatpacking plant, Calgary: Shut plant and laid off 1,000 workers after 38 employees tested positive for COVID-19.
TransLink: The Metro Vancouver transit authority is laying off 1,500 workers.
Winnipeg School Division: Laid off 330 of its 6,000 employees.
River East Transcona School Division, Winnipeg: Laid off 600 employees.
Toronto Transit Commission: Laying off 1,200 employees over the coming weeks.
HBC: Laid off 90 Toronto-area staff.
Postmedia: Laid off 80 staff and shut 15 papers.
Algoma Steel: Laid off 70 full-time employees.
Vancouver Airport Authority: Announced an undisclosed number of layoffs of its 500 staff.
University of Saskatchewan: Announced an unspecified number of layoffs to begin May 4.
Resolute Forest Products: Will lay off 1,000 workers in Quebec.
Calfrac Well Services: Announced 70 per cent of its 1,600 North American field personnel.


Mock interview: Find smallest substring containing distinct chars in given array

July 4, 2020

Introduction

It is my 10:00 AM mock interview on the platform on interviewing.io. I have 9 credits to get interviews as an interviewee, I was excited to meet an Apple engineer and a Microsoft employee last night 8:00 PM and 10 PM mock interviews, this morning 10:00 AM I met a Google intern, Morgan Stanley engineer as an interviewer. I like to write a case study on this mock interview.

Case study

I like to get the transcript into a gist, and then share the link first, and also paste the content in my blog as well.

Let me do that.

Here is the gist.



Continue




Actionable Items


Write a solution using bit manipulation to check if substring containing all distinct chars in the given array. Find leetcode algorithm and submit an answer.

I have to learn how to give feedback from the template the interviewer shared. He learned from Google interview bootcamp when he was Google intern in Europe.


Mock interview: Is it a binary search tree?

Here is the gist.



continue



Mock interview: Square root using binary search

July 4, 2020

Introduction

It was my 10:00 PM mock interview on July 3, 2020. The first algorithm is to work on square root, I chose to solve it using binary search. Here is the case study.

Case study

Here is the gist.



Feedbacks



Actionable Items

Friday, July 3, 2020

Mock interview: Is graph bipartite?

Here is the link.





Actionable Items

Submit a solution using BFS on this algorithm on Leetcode.com.

Here is the link. 


Leetcode discuss: Leetcode 10: regular expression

Here is the link. 

Case study - mock interview as an interviewer on July 2, 2017

July 2, 2020

Introduction
It is a good idea to review what I learned as an interviewer and then write a post after three years. Here is the blog about mock interview.

The following is C# code to pass online judge.

public class Solution {
    //public bool IsMatch(string s, string p) {
    public bool IsMatch(string text, string pattern)
        {
            if (text == null || pattern == null)
            {
                return false;
            }

            if (pattern.Length == 0)
            {
                return text.Length == 0; 
            }

            var test_pattern = pattern[0]; //#
            bool isStar = pattern.Length > 1 && pattern[1] == '*';
            bool firstCharMatching = text.Length > 0 &&
                                    (test_pattern == '.' || text[0] == test_pattern);            

            if (pattern.Length > 1 && isStar)
            {
                return IsMatch(text, pattern.Substring(2)) ||
                (firstCharMatching &&IsMatch(text.Substring(1), pattern));                 
            }
            else if (firstCharMatching)
            {
                return IsMatch(text.Substring(1), pattern.Substring(1));
            }
            else
            {
                return false; 
            }
        }
}


Leetcode discuss: Leetcode 10: regular expression

Here is the link.

Case study: dynamic programming solution on January 26, 2018

July 2, 2020
My practice was on January 26, 2018. Here is my blog to document my experience.
Case study
It is a good idea to work on a simple test case, and then build a table to calculate the value of regular expression matching.
I like to share the table I prepared on my blog in 2018. Here is the blog.
Test case: acd with "abc" pattern string
image
public class Solution {
    public bool IsMatch(string text, string pattern)
        {
            if (text == null || pattern == null) // false 
            {
                return false;
            }

            var tLength = text.Length; // 0 
            var pLength = pattern.Length; // 4

            var dp = new bool[tLength + 1, pLength + 1]; // 1, 5

            dp[0, 0] = true; // 

            for (int i = 1; i < tLength + 1; i++)
            {
                dp[i, 0] = false;
            }

            // "" matches "a*b*" etc. 
            for (int i = 1; i < pLength + 1; i++)
            {                
                dp[0, i] = i >= 2 && pattern[i - 1] == '*' && dp[0, i - 2]; 
            }

            for (int row = 1; row < tLength + 1; row++)
            {
                for (int col = 1; col < pLength + 1; col++)
                {
                    var visitChar = text[row - 1];
                    var patternChar = pattern[col - 1];

                    var isStar = patternChar == '*';
                    if (!isStar)
                    {                        
                        dp[row, col] = (patternChar == '.' || visitChar == patternChar) && dp[row - 1, col - 1];                        
                    }
                    else
                    {                                  
                        dp[row, col] = col >= 2 &&
                             // zero time
                            (( dp[row, col - 2]) ||
                             //                                                                  one time         || more than one time
                             ((pattern[col - 2] == '.' || visitChar == pattern[col - 2]) && (dp[row - 1, col - 2] || dp[row - 1, col])));
                    }

                    /*
                     * code review on May 9, 2019
                     * "mississippi"
                       "mis*is*p*."
                    else
                    {                            //   zero time          one time           more then one time        
                        dp[row, col] = col >= 2 && (dp[row, col - 2] || dp[row, col - 1] || dp[row - 1, col]);
                    } 
                     */
                }
            }

            return dp[tLength, pLength];
        }
}


Leetcode discuss: Leetcode 10: regular expression

Here is the link. 


C# My showcase of practice starting from 2017

July 2, 2020

It take some time for me to review all my past practice on this hard level algorithm. What I like to do is to write a few discussion posts first, and then I will figure out how to review those practice.

I went through very good learning experience to work with over 10 programmers as an interviewer or interviewee. I documented my p-r-a-m-p mock interview website over 10 times practice here.

Leetcode 10: regular expression
July 2, 2017
Case study - mock interview as an interviewer on July 2, 2017

C# code review memoization practice on July 2 2017

January 26, 2018
Case study: dynamic programming solution on January 26, 2018

April 21, 2018
Case study: mock interview as an interviewee on April 21, 2018

Practice with a bug
March 29, 2018
Case study: dynamic programming solution with a bug on March 29, 2018