|
| 1 | +# lintcode (WIP) |
| 2 | + |
| 3 | +Plugin to provide `lintcode-cli` to work with lintcode.com. |
| 4 | + |
| 5 | +Support similar commands as leetcode: |
| 6 | + |
| 7 | +* `list` |
| 8 | +* `show` |
| 9 | +* `test` |
| 10 | +* `submit` |
| 11 | +* `user` |
| 12 | + |
| 13 | +## NOTE |
| 14 | + |
| 15 | +1. when enabled, it will hide existing leetcode plugin, thus everything is working against lintcode.com (including user/problems cache, etc). |
| 16 | +2. lintcode.com itself seems has bug in running test? The expected answer returned is not right! |
| 17 | + |
| 18 | +## Usage |
| 19 | + |
| 20 | +### list |
| 21 | + |
| 22 | + $ leetcode list -q e array |
| 23 | + ✔ [548] Intersection of Two Arrays II Easy (21.00 %) |
| 24 | + ✔ [547] Intersection of Two Arrays Easy (23.00 %) |
| 25 | + ✔ [373] Partition Array by Odd and Even Easy (41.00 %) |
| 26 | + ✔ [177] Convert Sorted Array to Binary Search Tree With Minimal Height Easy (32.00 %) |
| 27 | + ✔ [138] Subarray Sum Easy (30.00 %) |
| 28 | + ✔ [101] Remove Duplicates from Sorted Array II Easy (30.00 %) |
| 29 | + ✔ [100] Remove Duplicates from Sorted Array Easy (31.00 %) |
| 30 | + ✔ [ 64] Merge Sorted Array Easy (34.00 %) |
| 31 | + ✔ [ 50] Product of Array Exclude Itself Easy (27.00 %) |
| 32 | + ✔ [ 44] Minimum Subarray Easy (38.00 %) |
| 33 | + ✔ [ 41] Maximum Subarray Easy (39.00 %) |
| 34 | + ✔ [ 39] Recover Rotated Sorted Array Easy (27.00 %) |
| 35 | + ✔ [ 6] Merge Two Sorted Arrays Easy (36.00 %) |
| 36 | + |
| 37 | +### show |
| 38 | + |
| 39 | + $ leetcode show 6 -gx |
| 40 | + [6] Merge Two Sorted Arrays |
| 41 | + |
| 42 | + http://www.lintcode.com/en/problem/merge-two-sorted-arrays/ |
| 43 | + |
| 44 | + * lintcode |
| 45 | + * Easy (36.00%) |
| 46 | + * Source Code: 6.merge-two-sorted-arrays.cpp |
| 47 | + * Testcase Example: '[1]\n[1]\n' |
| 48 | + |
| 49 | + Merge two given sorted integer array A and B into a new sorted integer array. |
| 50 | + Example |
| 51 | + A=[1,2,3,4] |
| 52 | + B=[2,4,5,6] |
| 53 | + return [1,2,2,3,4,4,5,6] |
| 54 | + Challenge |
| 55 | + How can you optimize your algorithm if one array is very large and the other is very small? |
| 56 | + |
| 57 | +### test |
| 58 | + |
| 59 | + $ leetcode test 6.merge-two-sorted-arrays.cpp |
| 60 | + |
| 61 | + Input data: |
| 62 | + [1] |
| 63 | + [1] |
| 64 | + |
| 65 | + |
| 66 | + Actual |
| 67 | + ✔ runtime: 11 ms |
| 68 | + ✔ answer: '[1,1]' |
| 69 | + ✔ stdout: '' |
| 70 | + |
| 71 | + Expected |
| 72 | + ✔ answer: '[1,1]' |
| 73 | + ✔ stdout: '' |
| 74 | + |
| 75 | +### submit |
| 76 | + |
| 77 | + $ leetcode submit 6.merge-two-sorted-arrays.cpp |
| 78 | + ✔ Accepted |
| 79 | + ✔ 11/11 cases passed (162 ms) |
| 80 | + [WARN] Failed to get submission beat ratio. |
0 commit comments