File: root - text - article - 2019 - 10 - daily-problem-longest-substring-without-repating-characters.txt
Tags: 微软, 面试题, 最长子字符串, Microsoft, interview questions, daily problems, longest substring, | English | Home Page | Category: Computing | 309 Views, 19922 Search Bots | 81 Words
| Browse | Archive
![Subscribe to Feed Burner Subscribe to Feed Burner](/images/form/rss.gif)
Tags: 微软, 面试题, 最长子字符串, Microsoft, interview questions, daily problems, longest substring, | English | Home Page | Category: Computing | 309 Views, 19922 Search Bots | 81 Words
![Subscribe to Feed Burner Subscribe to Feed Burner](/images/form/rss.gif)
This problem was recently asked by Microsoft:
Given a string, find the length of the longest substring without repeating characters.
Here is an example solution in Python language. (Any language is OK to use in an interview, though we'd recommend Python as a generalist language utilized by companies like Google, Facebook, Netflix, Dropbox, Pinterest, Uber, etc.,)
Can you find a solution in linear time?
Tags: 微软, 面试题, 最长子字符串, Microsoft, interview questions, daily problems, longest substring, | English | Home Page | Cateogry: Computing | 309 Views, 19922 Search Bots | 81 Words Given a string, find the length of the longest substring without repeating characters.
Here is an example solution in Python language. (Any language is OK to use in an interview, though we'd recommend Python as a generalist language utilized by companies like Google, Facebook, Netflix, Dropbox, Pinterest, Uber, etc.,)
class Solution:
def lengthOfLongestSubstring(self, s):
# Fill this in.
print Solution().lengthOfLongestSubstring('abrkaabcdefghijjxxx')
# 10
Can you find a solution in linear time?
![Subscribe to Feed Burner Subscribe to Feed Burner](/images/form/rss.gif)
Related Articles
- Most Frequent Subtree Sum
- Daily Interview Problem: Deepest Node in a Binary Tree
- Staying on a Chess Board
- Daily Interview Problem: Largest BST in a Binary Tree
- Daily Interview Problem: Get all Values at a Certain Height in a Binary Tree
- Fibonacci coding
- Algorithm Interview Question: H-Index
- [Daily Problem] Longest Increasing Subsequence
- Daily Interview Problem: Given two arrays, write a function to compute their intersection.
- How to Play WAV music under DOS?
©2006~2024 SteakOverCooked - 0.01485 Seconds(s) - 3559.596 KB/s - 42 Online
Memory: 530.34 KB
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - Server PHP Version: 7.4.33
How to Cook a Perfect Steak? | <meta name="robots" content="noindex, follow" />
![](/images/top.jpg)
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - Server PHP Version: 7.4.33
Read & Write - Normal - Mini - Post - All Comments - Statistics
Be the first one to comment this page !