楼主: 饺子没虾仁
跳转到指定楼层
上一主题 下一主题
收起左侧

2020个人战拖刷题打卡

🔗
 楼主| 饺子没虾仁 2020-2-16 12:50:33 | 只看该作者
全局:
fortunecraig 发表于 2020-2-14 00:39
楼主加油,我也准备专业刷题

谢谢,一起加油
回复

使用道具 举报

🔗
 楼主| 饺子没虾仁 2020-2-16 12:55:11 | 只看该作者
全局:
本帖最后由 饺子没虾仁 于 2020-2-16 12:56 编辑

02/14 补上昨天的
4. Sum ||, Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[letter_i][i] + B[j] + C[k] + D[l] is zero, remember to keep time complexity under o(N^2),

02/15
454. Longest Substring with At Least K Repeating Characters,find the length of the longest substring T of a given string, the chars in T have to be the same, repeat no less than K,
In JS, access letter in a string can be done in str.charAt[index] [i]i[i]nstead of str[index]
[/i][/i][/i]
回复

使用道具 举报

🔗
 楼主| 饺子没虾仁 2020-2-19 10:31:56 | 只看该作者
全局:
02/18 最近略忙,改为每天一题
29. Divide Two Integers (Bit-wise Operation),
- the core thought is to see how many divisors can be taken from the dividend,
- the shift left or right operation is the same as multiply by 2 or divided by 2
回复

使用道具 举报

🔗
 楼主| 饺子没虾仁 2020-2-19 10:36:01 | 只看该作者
全局:
本帖最后由 饺子没虾仁 于 2020-2-19 10:38 编辑
饺子没虾仁 发表于 2020-2-16 12:55
02/14 补上昨天的
4. Sum ||, Given four lists A, B, C, D of integer values, compute how many tuples ...

补一下大佬提供的395的解法:
您好!
本帖隐藏的内容需要积分高于 50 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 50 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies
回复

使用道具 举报

🔗
 楼主| 饺子没虾仁 2020-2-20 09:31:16 | 只看该作者
全局:
33. Search in Rotated Sorted Array,
Suppose an array sorted in ascending order is rotated at some pivot unknown, given a target value to search. If found in the array return its index, otherwise return -1
Easy Peasy, 自己搞定
回复

使用道具 举报

🔗
 楼主| 饺子没虾仁 2020-2-21 09:06:18 | 只看该作者
全局:
34. Find First and Last Position of Element in Sorted Array
Easy Peasy 一遍通过
回复

使用道具 举报

🔗
 楼主| 饺子没虾仁 2020-3-2 10:27:39 | 只看该作者
全局:
最近有些懈怠,加油不放弃
补上 02/23,
36. Valid Sudoku,Determine if a 9x9 Sudoku board is valid
learn the use of set in JavaScript

03/01
46. Permutations Given a collection of distinct integers, return all possible permutations.
using recursion method to solve the problem
回复

使用道具 举报

🔗
 楼主| 饺子没虾仁 2020-3-12 10:19:48 | 只看该作者
全局:
03/09 补上
48. Rotate Image
given an n x n 2D matrix representing an image, rotate the image 90 degree(clockwise),
Geometry(?), for an n x n matrix, this could be accomplished by doing transpose and then reverse

03/11
49. Group Anagrams
Given an array of strings, group anagrams together.
Simple solution using the hash map, check anagrams by split().sort().join() and then traverse the hash map
回复

使用道具 举报

🔗
 楼主| 饺子没虾仁 2020-3-15 04:12:11 | 只看该作者
全局:
03/14
50. Pow(x. n)
Solved by recursion, the key is to figure out how to implement the recursion by deciding whether the pow is odd or even
回复

使用道具 举报

🔗
 楼主| 饺子没虾仁 2020-3-21 09:46:16 | 只看该作者
全局:
03/20
54. Spiral Matrix
traverse a 2D matrix(m x n) in a spiral way(clockwise) and push the elements in an array
solved by recursion, traverse through the out layer, the key is to figure out a way to traverse a layer with parameters of row and column
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表