Showing posts with label reverse words in a string. Show all posts
Showing posts with label reverse words in a string. Show all posts

Sunday, December 24, 2017

Array linear scan algorithm

Dec. 24, 2017

Introduction


It is the Christmas day and I like to take some time to practice mock interview. And I had 10:00 am mock interview.

The algorithm is the array linear scan and reverse the array.

Here is the C# algorithm.

Code review


Plan to find all past practice first and review every practice here.


Wednesday, May 24, 2017

Leetcode 151: reverse words in a string

May 24, 2017

Problem statement is here.

C# practice is here. Need to work on failed test cases, multiple space, "a   b" should be reversed to "b   a".

Follow up 


April 16, 2017
Mocking experience, reverse words in a string, C# code is here.

June 20, 2017
Mocking experience, reverse words in a string, C# code is here.

Julia learned the lesson how to work on linear scan array hard lesson through Leetcode contest in May, she spent over 40 minutes on one algorithm, and then she read the idea to spend 5 minutes less to write very clear solution. The blog is called Leetcode 605: Can plant flower.