https://github.com/bryanbocao/leetcodehigh

https://github.com/bryanbocao/leetcodehigh

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 5 committers (40.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.0%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: bryanbocao
  • Language: Java
  • Default Branch: master
  • Size: 1.59 MB
Statistics
  • Stars: 1
  • Watchers: 3
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 10 years ago · Last pushed almost 9 years ago
Metadata Files
Readme

README.md

LeetCodeHigh

正确即是正义

王牌程序猿

代码狂人

Spoiler Attention! Solutions are listed in this repository, if you haven't tried these problems yet, it is highly recommended for you to solve them yourself, rather than viewing these answers before solving them yourself.

If you want to test these code, please delete the first comment block, package statement and the last few comments, then submit the rest of the code. For example, the solution of CompareTheTriplets is: ``` /** https://leetcode.com/problems/two-sum/ 1. Two Sum QuestionEditorial Solution My Submissions Total Accepted: 263740 Total Submissions: 1051214 Difficulty: Easy Given an array of integers, return indices of the two numbers such that they add up to a specific target.

You may assume that each input would have exactly one solution.

Example: Given nums = [2, 7, 11, 15], target = 9,

Because nums[0] + nums[1] = 2 + 7 = 9, return [0, 1]. UPDATE (2016/2/13): The return format had been changed to zero-based indices. Please read the above updated description carefully. */ package algorithms.num001_TwoSum;

import java.util.HashMap; import java.util.Map;

public class Solution { public int[] twoSum(int[] nums, int target) { Map map = new HashMap(); for (int i = 0; i < nums.length; i++) { if (map.containsKey(target - nums[i])) return new int[]{map.get(target - nums[i]), i}; else map.put(nums[i], i); } return new int[2]; } } //20160726Tue23:29 duration:6m53s73 Accepted @github.com/BryanBo-Cao,hackerrank.com/bryanbocao,leetcode.com/bryanbocao-0/,linkedin.com/in/bryanbocao Delete https://leetcode.com/problems/two-sum/ 1. Two Sum QuestionEditorial Solution My Submissions Total Accepted: 263740 Total Submissions: 1051214 Difficulty: Easy Given an array of integers, return indices of the two numbers such that they add up to a specific target.

You may assume that each input would have exactly one solution.

Example: Given nums = [2, 7, 11, 15], target = 9,

Because nums[0] + nums[1] = 2 + 7 = 9, return [0, 1]. UPDATE (2016/2/13): The return format had been changed to zero-based indices. Please read the above updated description carefully. */ and package algorithms.num001_TwoSum; You would submit the code like this: import java.util.HashMap; import java.util.Map;

public class Solution { public int[] twoSum(int[] nums, int target) { Map map = new HashMap(); for (int i = 0; i < nums.length; i++) { if (map.containsKey(target - nums[i])) return new int[]{map.get(target - nums[i]), i}; else map.put(nums[i], i); } return new int[2]; } } ```

Option 2:

Some problems just need some blocks of the code but not the entire scripts, in this case just copy the scrips inside these two tags ``` // BryanBo-Cao's code ====== start

// BryanBo-Cao's code ====== end ```

Reference:

leetcode.com

Useful Links:

http://coolshell.cn/articles/12052.html https://www.youtube.com/watch?v=264b_f6828Y&list=PLGvfHSgImk4ZR3v2drDwHrmwu2a645sxL https://www.zhihu.com/question/20368410

Courses

Dynamic Programming

https://www.topcoder.com/community/data-science/data-science-tutorials/dynamic-programming-from-novice-to-advanced/

https://people.eecs.berkeley.edu/~vazirani/algorithms/chap6.pdf

https://www.cs.cmu.edu/~avrim/451f09/lectures/lect1001.pdf

Owner

  • Name: BBC
  • Login: bryanbocao
  • Kind: user
  • Location: Dr. Wily's Castle

One of the many Ph.D. candidates.

GitHub Events

Total
Last Year

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 544
  • Total Committers: 5
  • Avg Commits per committer: 108.8
  • Development Distribution Score (DDS): 0.482
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
bryanbo-cao b****o@o****m 282
SerendpityZOEY z****3@h****m 148
Owen s****0@g****m 112
BryanBo.Cao G****O@r****u 1
BryanBo-Cao B****n@e****u 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels