This is the repo of my LeetCode solutions, and currently I just use Javascript to solve the questions, maybe in the future, I will use other languages I like to get the ALL PASS grade. Questions and Summissions SequenceTitleDifficultySubmission ...
This is the solutions collection of my LeetCode submissions, most of them are programmed in JavaScript. All JavaScript codes are wrote in ECMAScript 6 standard, each solution file will contain a problem description in the beginning, and followed by some necessary explanation, some problems will pr...
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
代码语言:javascript 代码运行次数:0 运行 AI代码解释 Input: 4 Output: 2 Explanation: There are two distinct solutions to the 4-queens puzzle as shown below. [ [".Q..", // Solution 1 "...Q", "Q...", "..Q."], ["..Q.", // Solution 2 "Q...", "...Q", ".Q.."] ]...
solutions functionaddStrings(num1:string, num2:string):string{return(BigInt(num1) +BigInt(num2)).toString(); }; Runtime 52 ms Beats96.39%of users with TypeScript Memory 51.12 MB Beats97.94%of users with TypeScript https://leetcode.com/problems/add-strings/solutions/5256888/leetcode-415-...
代码(JavaScript) 代码语言:javascript 代码运行次数:0 运行 AI代码解释 functionsurvivedRobotsHealths(positions:number[],healths:number[],directions:string):number[]{//用一个栈存放当前存活的机器人letstack:robot[]=[];interfacerobot{i:number;p:number;h:number;d:string;}letrobots:robot[]=[];//从...
Solutions Brute force, simple BFS 代码语言:javascript 代码运行次数:0 运行 AI代码解释 1privatefinal int[]xDirection={1,0,-1,0};2privatefinal int[]yDirection={0,-1,0,1};3privatefinal intONE_MILLION=1000000;45publicbooleanisEscapePossible(int[][]blocked,int[]source,int[]target){6if(blocked...
best solutions https://leetcode-cn.com/submissions/detail/112453419/ /** *@param{number[]}nums*@param{number}target*@return{number[]} */vartwoSum =function(nums, target) {varmap=newMap();for(leti=0;i<nums.length;i++){if(!map.has(target-nums[i])){ ...
We can build a one to one mapping between the pattern and string, since it's bijection, if two characters in the pattern map to the same string, then it's not a valid bijection, therefore return false. Solutions Encode string and patterns then compare 代码语言:javascript 代码运行次数:0 ...
A solid programmer: you have experiences with at least one compiled language, like C#, Java, C++, etc Up-to-speed on all things Cloud: it is an added bonus if you have working experience with public cloud solutions such as AWS, GCP, or Azure MUST BE FLUENT IN MANDARIN AND ENGLISH You...