[qns] algo: i18n
This commit is contained in:
parent
e2f96144e3
commit
e6fccf0f8a
8
apps/web/src/__generated__/questions/algo/array-balanced-brackets/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/array-balanced-brackets/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/array-find-duplicate/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/array-find-duplicate/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/array-maximum-product-contiguous/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/array-maximum-product-contiguous/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/array-maximum-sum-contiguous/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/array-maximum-sum-contiguous/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/array-most-common-elements/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/array-most-common-elements/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/array-product-excluding-current/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/array-product-excluding-current/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/array-reachable-end/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/array-reachable-end/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/array-rotated-find/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/array-rotated-find/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/array-smallest-in-rotated/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/array-smallest-in-rotated/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/binary-search-tree-kth-smallest/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/binary-search-tree-kth-smallest/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/binary-search-tree-validate/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/binary-search-tree-validate/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/binary-search-tree/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/binary-search-tree/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/binary-tree-equal/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/binary-tree-equal/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/binary-tree-flip/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/binary-tree-flip/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/binary-tree-level-order-traversal/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/binary-tree-level-order-traversal/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/binary-tree-maximum-depth/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/binary-tree-maximum-depth/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/binary-tree-maximum-total-path/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/binary-tree-maximum-total-path/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/binary-tree-subtree/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/binary-tree-subtree/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/breadth-first-search/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/breadth-first-search/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/combinations-target-sum/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/combinations-target-sum/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/count-ones-in-binary/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/count-ones-in-binary/locales/zh-CN.json
generated
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"description": "var Component=(()=>{var p=Object.create;var r=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var g=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),j=(e,n)=>{for(var i in n)r(e,i,{get:n[i],enumerable:!0})},a=(e,n,i,s)=>{if(n&&typeof n==\"object\"||typeof n==\"function\")for(let o of x(n))!f.call(e,o)&&o!==i&&r(e,o,{get:()=>n[o],enumerable:!(s=d(n,o))||s.enumerable});return e};var _=(e,n,i)=>(i=e!=null?p(b(e)):{},a(n||!e||!e.__esModule?r(i,\"default\",{value:e,enumerable:!0}):i,e)),T=e=>a(r({},\"__esModule\",{value:!0}),e);var l=g((w,u)=>{u.exports=_jsx_runtime});var X={};j(X,{default:()=>D,frontmatter:()=>y});var t=_(l());var c=MDXTestExamples;var m=[{input:[[\"num\",8]],output:1,explanation:\"The given number in binary (1000) has a total of one set bit\"},{input:[[\"num\",9]],output:2,explanation:\"The given number in binary (1001) has a total of two set bit\"},{input:[[\"num\",123]],output:6,explanation:\"The given number in binary (1111011) has a total of six set bit\"}];var y={title:\"\\u8BA1\\u7B97\\u4E8C\\u8FDB\\u5236\\u6570\\u4E2D\\u7684\\u8BBE\\u7F6E\\u4F4D\",excerpt:\"\\u5B9E\\u73B0\\u4E00\\u4E2A\\u51FD\\u6570\\u6765\\u67E5\\u627E\\u7ED9\\u5B9A\\u6574\\u6570\\u7684\\u4E8C\\u8FDB\\u5236\\u8868\\u793A\\u4E2D\\u7684\\u8BBE\\u7F6E\\u4F4D\"};function h(e){let n=Object.assign({p:\"p\",code:\"code\",h3:\"h3\",ul:\"ul\",li:\"li\"},e.components);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:[\"\\u7ED9\\u5B9A\\u4E00\\u4E2A\\u6B63\\u6574\\u6570\",(0,t.jsx)(n.code,{children:\"num\"}),\"\\uFF0C\\u786E\\u5B9A\\u7ED9\\u5B9A\\u6570\\u5B57\\u7684\\u4E8C\\u8FDB\\u5236\\u8868\\u793A\\u4E2D\\u5B58\\u5728\\u7684\\u8BBE\\u7F6E\\u4F4D\\uFF081s\\uFF09\\u7684\\u6570\\u91CF\\uFF0C\\u901A\\u5E38\\u79F0\\u4E3A\\u6C49\\u660E\\u6743\\u91CD\\u3002\"]}),`\n`,(0,t.jsx)(n.h3,{children:\"\\u8F93\\u5165\"}),`\n`,(0,t.jsxs)(n.ul,{children:[`\n`,(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:\"num: number\"}),\": \\u4E00\\u4E2A\\u6B63\\u6574\\u6570\"]}),`\n`]}),`\n`,(0,t.jsx)(c,{testCases:m}),`\n`,(0,t.jsx)(n.h3,{children:\"\\u7EA6\\u675F\"}),`\n`,(0,t.jsxs)(n.ul,{children:[`\n`,(0,t.jsxs)(n.li,{children:[\"1 <= \",(0,t.jsx)(n.code,{children:\"num\"}),\" <= 2^31 - 1\"]}),`\n`]})]})}function C(e={}){let{wrapper:n}=e.components||{};return n?(0,t.jsx)(n,Object.assign({},e,{children:(0,t.jsx)(h,e)})):h(e)}var D=C;return T(X);})();\n;return Component;",
|
||||
"info": {
|
||||
"excerpt": "实现一个函数来查找给定整数的二进制表示中的设置位",
|
||||
"title": "计算二进制数中的设置位"
|
||||
},
|
||||
"solution": "var Component=(()=>{var m=Object.create;var t=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty;var x=(i,n)=>()=>(n||i((n={exports:{}}).exports,n),n.exports),B=(i,n)=>{for(var r in n)t(i,r,{get:n[r],enumerable:!0})},o=(i,n,r,l)=>{if(n&&typeof n==\"object\"||typeof n==\"function\")for(let c of f(n))!p.call(i,c)&&c!==r&&t(i,c,{get:()=>n[c],enumerable:!(l=g(n,c))||l.enumerable});return i};var j=(i,n,r)=>(r=i!=null?m(b(i)):{},o(n||!i||!i.__esModule?t(r,\"default\",{value:i,enumerable:!0}):r,i)),O=i=>o(t({},\"__esModule\",{value:!0}),i);var h=x((X,d)=>{d.exports=_jsx_runtime});var M={};B(M,{default:()=>D});var e=j(h());var u=MDXCodeBlock;var s=`export default function countOnesInBinary(num: number): number {\n // Count the number of set bits using Brian Kernighan's algorithm\n let count: number = 0;\n while (num !== 0) {\n count += num & 1; // Check the least significant bit whether it is a set bit and update the counting result\n num >>>= 1; // Unsigned right shift by 1 bit\n }\n return count;\n}\n`;function a(i){let n=Object.assign({h2:\"h2\",p:\"p\",code:\"code\",h3:\"h3\",ol:\"ol\",li:\"li\",ul:\"ul\",strong:\"strong\"},i.components);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.h2,{children:\"1. \\u4F7F\\u7528 Brian Kernighan \\u7B97\\u6CD5\"}),`\n`,(0,e.jsxs)(n.p,{children:[\"Brian Kernighan \\u7B97\\u6CD5\\u7528\\u4E8E\\u904D\\u5386\\u6570\\u5B57\\u7684\\u4E8C\\u8FDB\\u5236\\u8868\\u793A\\u3002\\u8BE5\\u65B9\\u6CD5\\u4E0D\\u662F\\u76F4\\u63A5\\u904D\\u5386\\u6240\\u6709\\u4F4D\\uFF0C\\u800C\\u662F\\u5728\\u6BCF\\u6B21\\u8FED\\u4EE3\\u4E2D\\u68C0\\u67E5\\u6700\\u4F4E\\u6709\\u6548\\u4F4D\\uFF0C\\u5982\\u679C\\u8BE5\\u4F4D\\u4E3A \",(0,e.jsx)(n.code,{children:\"1\"}),\"\\uFF0C\\u5219\\u66F4\\u65B0\\u8BA1\\u6570\\uFF0C\\u7136\\u540E\\u8FDB\\u884C\\u53F3\\u79FB\\u4EE5\\u4E22\\u5F03\\u6700\\u4F4E\\u6709\\u6548\\u4F4D\\u3002\\u6B64\\u8FC7\\u7A0B\\u5C06\\u6301\\u7EED\\u5230\\u6240\\u6709\\u4F4D\\u90FD\\u88AB\\u5904\\u7406\\u3002\"]}),`\n`,(0,e.jsx)(n.h3,{children:\"\\u7B97\\u6CD5\"}),`\n`,(0,e.jsxs)(n.ol,{children:[`\n`,(0,e.jsxs)(n.li,{children:[\"\\u521D\\u59CB\\u5316\\u4E00\\u4E2A\\u53D8\\u91CF \",(0,e.jsx)(n.code,{children:\"count\"}),\"\\uFF0C\\u7528\\u4E8E\\u5B58\\u50A8\\u5728\\u4E8C\\u8FDB\\u5236\\u8868\\u793A\\u4E2D\\u9047\\u5230\\u7684 \",(0,e.jsx)(n.code,{children:\"1\"}),\" \\u7684\\u6570\\u91CF\\u3002\"]}),`\n`,(0,e.jsxs)(n.li,{children:[\"\\u4F7F\\u7528\\u5FAA\\u73AF\\u5904\\u7406\\u8F93\\u5165\\u6570\\u5B57\\uFF1A\",`\n`,(0,e.jsxs)(n.ul,{children:[`\n`,(0,e.jsxs)(n.li,{children:[\"\\u4F7F\\u7528\\u6570\\u5B57\\u548C \",(0,e.jsx)(n.code,{children:\"1\"}),\" \\u4E4B\\u95F4\\u7684\\u6309\\u4F4D \",(0,e.jsx)(n.code,{children:\"AND\"}),\" \\u8FD0\\u7B97\\u6765\\u68C0\\u67E5\\u6700\\u4F4E\\u6709\\u6548\\u4F4D\\u3002\"]}),`\n`,(0,e.jsxs)(n.li,{children:[\"\\u5982\\u679C\\u6700\\u4F4E\\u6709\\u6548\\u4F4D\\u662F \",(0,e.jsx)(n.code,{children:\"1\"}),\"\\uFF0C\\u5219\\u9012\\u589E \",(0,e.jsx)(n.code,{children:\"count\"}),\"\\u3002\"]}),`\n`,(0,e.jsxs)(n.li,{children:[\"\\u5BF9\\u6570\\u5B57\\u8FDB\\u884C\\u65E0\\u7B26\\u53F7\\u53F3\\u79FB \",(0,e.jsx)(n.code,{children:\"1\"}),\" \\u4F4D\\uFF0C\\u4EE5\\u4E22\\u5F03\\u6700\\u4F4E\\u6709\\u6548\\u4F4D\\u3002\"]}),`\n`]}),`\n`]}),`\n`,(0,e.jsxs)(n.li,{children:[\"\\u7EE7\\u7EED\\u5FAA\\u73AF\\uFF0C\\u76F4\\u5230\\u6570\\u5B57\\u53D8\\u4E3A \",(0,e.jsx)(n.code,{children:\"0\"}),\"\\uFF0C\\u8FD9\\u610F\\u5473\\u7740\\u6240\\u6709\\u4F4D\\u90FD\\u5DF2\\u5904\\u7406\\u3002\"]}),`\n`,(0,e.jsxs)(n.li,{children:[\"\\u8FD4\\u56DE \",(0,e.jsx)(n.code,{children:\"count\"}),\" \\u7684\\u503C\\u3002\"]}),`\n`]}),`\n`,(0,e.jsx)(u,{children:s}),`\n`,(0,e.jsx)(n.h3,{children:\"Big-O \\u5206\\u6790\"}),`\n`,(0,e.jsxs)(n.ul,{children:[`\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\"\\u65F6\\u95F4\\u590D\\u6742\\u5EA6\\uFF1AO(1)\"}),\"\\u3002\\u8F93\\u5165\\u6570\\u5B57\\u662F\\u4E00\\u4E2A 32 \\u4F4D\\u6574\\u6570\\u3002\"]}),`\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\"\\u7A7A\\u95F4\\u590D\\u6742\\u5EA6\\uFF1AO(1)\"}),\"\\u3002\\u8BE5\\u7B97\\u6CD5\\u4F7F\\u7528\\u6052\\u5B9A\\u7684\\u7A7A\\u95F4\\u91CF\\uFF0C\\u4E0E\\u8F93\\u5165\\u5927\\u5C0F\\u65E0\\u5173\\u3002\"]}),`\n`]})]})}function C(i={}){let{wrapper:n}=i.components||{};return n?(0,e.jsx)(n,Object.assign({},i,{children:(0,e.jsx)(a,i)})):a(i)}var D=C;return O(M);})();\n;return Component;"
|
||||
}
|
||||
8
apps/web/src/__generated__/questions/algo/course-dependency/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/course-dependency/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/depth-first-search/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/depth-first-search/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/disjoint-intervals/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/disjoint-intervals/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/extraterrestrial-language/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/extraterrestrial-language/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/graph-count-connected-components/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/graph-count-connected-components/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/grid-count-islands/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/grid-count-islands/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/grid-distinct-paths/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/grid-distinct-paths/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/grid-find-words/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/grid-find-words/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/intervals-combine-overlapping/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/intervals-combine-overlapping/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/intervals-meeting-calendar/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/intervals-meeting-calendar/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/intervals-merge-new/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/intervals-merge-new/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/intervals-minimum-meeting-rooms/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/intervals-minimum-meeting-rooms/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/linked-list-combine-k-sorted/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/linked-list-combine-k-sorted/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/linked-list-combine-two-sorted/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/linked-list-combine-two-sorted/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/linked-list-delete-nth-from-end/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/linked-list-delete-nth-from-end/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/linked-list-detect-cycle/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/linked-list-detect-cycle/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/linked-list-rearrange/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/linked-list-rearrange/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/linked-list-reversal/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/linked-list-reversal/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
8
apps/web/src/__generated__/questions/algo/longest-common-subsequence/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/longest-common-subsequence/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/longest-consecutive-number-sequence/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/longest-consecutive-number-sequence/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/longest-increasing-subsequence/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/longest-increasing-subsequence/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/longest-non-repeating-substring/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/longest-non-repeating-substring/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/longest-palindromic-substring/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/longest-palindromic-substring/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/matrix-rotation/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/matrix-rotation/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/matrix-spiral-traversal/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/matrix-spiral-traversal/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/maximum-water-between-walls/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/maximum-water-between-walls/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/neighborhood-theft-circular/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/neighborhood-theft-circular/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/neighborhood-theft/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/neighborhood-theft/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/number-stream-median/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/number-stream-median/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/optimal-stock-trading/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/optimal-stock-trading/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/staircase-climbing-combinations/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/staircase-climbing-combinations/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/string-anagram-groups/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/string-anagram-groups/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/string-decode-message/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/string-decode-message/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/string-palindrome/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/string-palindrome/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/string-palindromic-substrings/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/string-palindromic-substrings/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/string-segment-words/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/string-segment-words/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/sum-without-addition/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/sum-without-addition/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/task-coordination/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/task-coordination/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/topological-sort/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/topological-sort/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
8
apps/web/src/__generated__/questions/algo/trie-prefix-tree/locales/zh-CN.json
generated
Normal file
8
apps/web/src/__generated__/questions/algo/trie-prefix-tree/locales/zh-CN.json
generated
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
|
@ -15,12 +15,11 @@ import {
|
|||
|
||||
async function generateSetupForQuestion(slug: string) {
|
||||
const questionPath = getQuestionSrcPathAlgo(slug);
|
||||
// This assumes that if the locale file is present for the description
|
||||
// it's also present for the solution.
|
||||
|
||||
const globPattern = path.posix.join(
|
||||
// Globby only supports forward slashes.
|
||||
questionPath.replaceAll(path.sep, path.posix.sep),
|
||||
// Assume that if the locale file is present for the description
|
||||
// it's also present for the solution
|
||||
'description',
|
||||
'*.mdx',
|
||||
);
|
||||
|
|
@ -29,15 +28,14 @@ async function generateSetupForQuestion(slug: string) {
|
|||
// Files are named after their locales.
|
||||
.map((filePath) => parse(filePath).name);
|
||||
|
||||
const outDir = getQuestionOutPathAlgo(slug);
|
||||
|
||||
fs.mkdirSync(outDir, { recursive: true });
|
||||
|
||||
const { metadata, files, skeleton, workspace } =
|
||||
await readQuestionAlgoLocaleAgnostic(slug);
|
||||
|
||||
const outDir = getQuestionOutPathAlgo(slug);
|
||||
const metadataPath = path.join(outDir, 'metadata.json');
|
||||
const setupPath = path.join(outDir, 'setup.json');
|
||||
|
||||
fs.mkdirSync(outDir, { recursive: true });
|
||||
fs.writeFileSync(metadataPath, JSON.stringify(metadata, null, 2));
|
||||
fs.writeFileSync(
|
||||
setupPath,
|
||||
|
|
@ -54,7 +52,7 @@ async function generateSetupForQuestion(slug: string) {
|
|||
|
||||
await Promise.all(
|
||||
locales.map(async (locale) => {
|
||||
const content = await readQuestionAlgo(slug);
|
||||
const content = await readQuestionAlgo(slug, locale);
|
||||
const contentOutPath = getQuestionOutPathAlgoLocaleContents(slug, locale);
|
||||
|
||||
fs.mkdirSync(path.dirname(contentOutPath), { recursive: true });
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import {
|
|||
|
||||
async function generateSetupForQuestion(slug: string) {
|
||||
const questionPath = getQuestionSrcPathJavaScript(slug);
|
||||
|
||||
const globPattern = path.posix.join(
|
||||
// Globby only supports forward slashes
|
||||
questionPath.replaceAll(path.sep, path.posix.sep),
|
||||
|
|
@ -29,15 +28,14 @@ async function generateSetupForQuestion(slug: string) {
|
|||
// Files are named after their locales.
|
||||
.map((filePath) => parse(filePath).name);
|
||||
|
||||
const outDir = getQuestionOutPathJavaScript(slug);
|
||||
|
||||
fs.mkdirSync(outDir, { recursive: true });
|
||||
|
||||
const { metadata, files, skeleton, workspace } =
|
||||
await readQuestionJavaScriptLocaleAgnostic(slug);
|
||||
|
||||
const outDir = getQuestionOutPathJavaScript(slug);
|
||||
const metadataPath = path.join(outDir, 'metadata.json');
|
||||
const setupPath = path.join(outDir, 'setup.json');
|
||||
|
||||
fs.mkdirSync(outDir, { recursive: true });
|
||||
fs.writeFileSync(metadataPath, JSON.stringify(metadata, null, 2));
|
||||
fs.writeFileSync(
|
||||
setupPath,
|
||||
|
|
|
|||
|
|
@ -81,10 +81,12 @@ export async function generateAllMetadata() {
|
|||
locale,
|
||||
),
|
||||
),
|
||||
generateQuestionsMetadata(
|
||||
readQuestionListMetadataAlgo,
|
||||
getQuestionsListOutFilenameAlgo(sourceLocale),
|
||||
sourceLocale,
|
||||
...locales.map((locale) =>
|
||||
generateQuestionsMetadata(
|
||||
readQuestionListMetadataAlgo,
|
||||
getQuestionsListOutFilenameAlgo(locale),
|
||||
locale,
|
||||
),
|
||||
),
|
||||
...locales.map((locale) =>
|
||||
generateQuestionsMetadata(
|
||||
|
|
|
|||
|
|
@ -22,16 +22,15 @@ async function generateSetupForQuestion(
|
|||
// Files are named after their locales.
|
||||
.map((filePath) => parse(filePath).name);
|
||||
|
||||
const outDir = getQuestionOutPathQuiz(slug);
|
||||
|
||||
fs.mkdirSync(outDir, { recursive: true });
|
||||
|
||||
const { metadata } = await readQuestionQuizLocaleAgnostic(
|
||||
quizSourceConfig,
|
||||
slug,
|
||||
);
|
||||
|
||||
const outDir = getQuestionOutPathQuiz(slug);
|
||||
const metadataPath = path.join(outDir, 'metadata.json');
|
||||
|
||||
fs.mkdirSync(outDir, { recursive: true });
|
||||
fs.writeFileSync(metadataPath, JSON.stringify(metadata, null, 2));
|
||||
|
||||
await Promise.all(
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue