-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocs__algorithm__sort__greedy.md.js
More file actions
1 lines (1 loc) · 2.27 KB
/
docs__algorithm__sort__greedy.md.js
File metadata and controls
1 lines (1 loc) · 2.27 KB
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[12],{"5Fyv":function(n,e,a){"use strict";a.r(e);var r=a("q1tI"),o=a.n(r),m=a("dEAq"),i=a("H1Ra"),t=o.a.memo((n=>{n.demos;return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"markdown"},o.a.createElement("h2",{id:"\u8d2a\u5fc3\u7b97\u6cd5\u6982\u5ff5"},o.a.createElement(m["AnchorLink"],{to:"#\u8d2a\u5fc3\u7b97\u6cd5\u6982\u5ff5","aria-hidden":"true",tabIndex:-1},o.a.createElement("span",{className:"icon icon-link"})),"\u8d2a\u5fc3\u7b97\u6cd5\u6982\u5ff5"),o.a.createElement("p",null,"\u662f\u4e00\u79cd\u5bfb\u627e",o.a.createElement("strong",null,"\u6700\u4f18\u89e3"),"\u4e3a\u624b\u6bb5\u8fbe\u6210\u6574\u4f53\u89e3\u51b3\u65b9\u6848\u7684\u7b97\u6cd5\uff0c\u8fd9\u4e9b\u4f18\u8d28\u7684\u89e3\u51b3\u65b9\u6848\u79f0\u4e3a",o.a.createElement("strong",null,"\u5c40\u90e8\u6700\u4f18\u89e3"),"\uff0c\u5c06\u6709\u5e0c\u671b\u5f97\u5230\u6b63\u786e\u7b54\u6848\u7684\u6700\u7ec8\u89e3\u51b3\u65b9\u6848\u79f0\u4e3a",o.a.createElement("strong",null,"\u5168\u5c40\u6700\u4f18\u89e3"),"\uff0c",o.a.createElement("strong",null,"\u8d2a\u5fc3"),"\u4f1a\u7528\u90a3\u4e9b\u8fdb\u6237\u65e0\u6cd5\u627e\u5230\u5b8c\u6574\u89e3\u51b3\u65b9\u6848\u7684\u95ee\u9898\uff0c\u6b21\u4f18\u89e3\u4e5f\u662f\u53ef\u4ee5\u63a5\u53d7\u7684"),o.a.createElement(i["a"],{code:"//\u8d2a\u5fc3\u7b97\u6cd5\u627e\u96f6\u95ee\u9898\uff1a50\u5757\u300110\u5757\u30015\u5757\u30011\u5757\nfunction mackChange(orginRmb, coins) {\n var remainRmb = 0;\n if (orginRmb % 50 < orginRmb) {\n coins[3] = parseInt(orginRmb % 50, 10);\n remainRmb = orginRmb % 50;\n orginRmb = remainRmb;\n }\n if (orginRmb % 10 < orginRmb) {\n coins[2] = parseInt(orginRmb % 10, 10);\n remainRmb = orginRmb % 10;\n orginRmb = remainRmb;\n }\n if (orginRmb % 5 < orginRmb) {\n coins[1] = parseInt(orginRmb % 5, 10);\n remainRmb = orginRmb % 5;\n orginRmb = remainRmb;\n }\n coins[0] = orginRmb % 1;\n return coins;\n}\nconsole.log(mackChange(63, []));",lang:"js"})))}));e["default"]=n=>{var e=o.a.useContext(m["context"]),a=e.demos;return o.a.useEffect((()=>{var e;null!==n&&void 0!==n&&null!==(e=n.location)&&void 0!==e&&e.hash&&m["AnchorLink"].scrollToAnchor(decodeURIComponent(n.location.hash.slice(1)))}),[]),o.a.createElement(t,{demos:a})}}}]);