/avatar.png

格心

考研词汇800句-4

考研词汇800句 - Part 4

800 句(第十三天)

  1. Last summer the drummer became an amateur dramatist dramatically.
    去年夏天 鼓手戏剧性地变成了业余剧作家
  2. Long Tongue League’s colleagues are fatigued with cataloguing.
    长舌联合会的同僚们编目录编累了。
  3. The bottle is hidden in the bottom of a ton of cotton the cottage.
    瓶子被藏在农舍里一吨棉花的底部
  4. The pattern of the battery doesn’t matter to the battle against the little brittle cattle.
    电池的式样对与脆小牛作战无关要紧。
  5. By the biography, the biologist’s playing the violet violin violently violated rules.
    据传记记载,生物学家猛奏紫罗兰色的小提琴违犯了规矩
  6. In the faithful waiter’s waist exists a list of the ten listeners.
    在忠实的侍者的腰里存有那十位听众的名单。
  7. The typist plays Typhoon on the piano in a typical style.
    打字员以典型的风格在钢琴上演奏“台风”。
  8. I pushed aside the crushed cushion in a rush and saw a bushy brush.
    我急忙推开压皱的软垫子 看见一把浓密的刷子。
  9. Riding on the ridge of the bridge, the proud bride shouts loudly to the cloud.
    骄傲的新娘骑在桥脊上对着云大声喊
  10. Th e decisive decimal point made the acid man decide to suicide.
    决定性的小数点使刻薄之人决定自杀。
  11. I’m convinced that the provincial government will provide provisional provisions.
    我深信地方政府将提供临时供应品。
  12. The hidden division is subdivided into individuals.
    隐藏的师被细分为个体
  13. The tides slide on the tidy wide beach and collide each other.
    海潮在整洁宽阔的海滩上滑行并相互碰撞。
  14. The briber described the tribe head’s bribery.
    行贿者描述了部落首领的受贿行为
  15. The ribbon of the rifle is fabricated with fiber.
    来复枪的带子是用纤维制作的
  16. The continent continues to control the import of petrol and petroleum.
    大陆方面继续控制汽油和石油进口。
  17. They returned in turn to bury the luxuries burnt in the burst.
    他们依次返回来埋藏在爆炸中烧毁的奢侈品。
  18. Banned murders in the suburb bring turbulent disturbance and burden to the urban turbine works.
    在郊区被禁止的谋杀给都市透平工厂带来汹涌骚乱和重负
  19. A nice price of the iced rice is offered to the officer.
    军官得到了冰冻米的好价钱。
  20. The poor man in poverty sleeps on the floor at the doorway.
    那个贫困的可怜人睡在门口的地板上。
  21. In the log lodge he said some illogical apologies.
    在木屋里他说了些不合逻辑的道歉话
  22. The slogan crier saw the dog and frog jump to and from in the fog.
    呼口号者看见狗和青蛙在雾中来回跳
  23. I recognized the large sized prize and seized it.
    我认出了大号奖品并将它占有。
  24. The lying liar lied to the dying diet maker that the tie was dyed blue.
    躺着的说谎者对临死的食疗制作者谎称带子染成了兰色
  25. The unyielding man fiercely pierced the shield in the field.
    那个不屈的人凶猛地刺穿田野里的盾牌
  26. Perhaps something happy will happen to the unhappy man.
    或许那个不高兴的人将要碰上某件快乐的事。
  27. The Greek checked his cheeks on the weekend.
    希腊人在周末检查了他的面颊。
  28. The troop’s stoop on the loop became the top topic at the bus stop.
    部队在环行道上的屈服在公共汽车站成了头等话题。
  29. The chop shopkeeper let the blood drip to the crops.
    排骨店老板让血滴到庄稼上。
  30. The pop song is popular in the populous city.
    这首流行歌曲在人口稠密的城市 流行
  31. Regretfully, we can’t regulate the irregular liner on the gulf.
    遗憾的是我们不能调整海湾上不定期的班船。
  32. The pig is obliged to dig a big pit for the pigeon.
    猪被迫为鸽子掘一个大坑。
  33. In this district I can strictly distinguish the distinct distinctions of bees’ sting by instinct.
    在该地区我能 直觉严格分辨蜜蜂刺的明显特征。
  34. In the Administration, this minister is in charge of registering regional religions.
    在内阁中这个部长负责登记区域宗教。
  35. The energetic enemy submerged in the water on the verge of the emergency.
    在紧急情况快要发生时精力充沛的敌军沉入水中
  36. The muscular musician found the bud in the mud in the museum.
    肌肉发达的音乐家在博物馆里的泥巴中发现了嫩芽。
  37. I also heard of the false pulses elsewhere.
    我在别处也听说过这些虚假脉冲
  38. The kid kidnapper can’t get rid of a ridiculous kidney disease.
    绑架小孩的家伙无法摆脱荒谬的肾病。
  39. My niece sacredly sacrificed a piece of pie to the God.
    侄女郑重地给神供上一块馅饼
  40. The sinful single singer’s finger skin is singular.
    有罪的单身歌手的手指皮肤独特。
  41. “The enterprise will be supervised by a group comprising prominent men,” the despising chairman said concisely with no compromise.
    “企业将由杰出人员构成的小组来监管 ,,”轻蔑的主席毫不妥协简明地说。
  42. The promising singer underwent mysterious misery.
    那位有前途的歌手遭受了神秘的痛苦
  43. The physician made a physical examination to the sophisticated philosopher and physicist.
    医生给世故的哲学家和物理学家作了体检。
  44. Bowing its elbow, the owl sows in the bowl.
    猫头鹰弯着肘在碗中播种。
  45. The cowardly cow vows not to tow vowels.
    胆怯的母牛发誓不拖元音字母。
  46. The answer is: Owing to a shower, the powerful powder is no longer on show.
    答案是:由于一场阵雨 这种强有力的火药不再展览了。
  47. The biscuit compels the mosquitoes quit the equipment.
    这种饼干迫使蚊子离开设备
  48. What a nuisance, the suit is ruined due to the unsuitable style.
    真糟 这套服装由于款式不合适而毁了
  49. The judge has prejudice to the juicy fruit.
    法官对这种多汁水果怀有偏见。
  50. The guide disguised his guilty of mixing the liquor with a liter of liquid.
    导游把酒与一公升液体混合的罪过掩饰起来.

800 句(第十四天)

  1. When I fetched the sketch on the stretcher I found the secretary’s secret.
    当我拿来担架上的素描时我发现了秘书的秘密
  2. The mutual spirits inspired us to reach the annual aim.
    相互的精神鼓舞了我们 达到年度目标
  3. The roaring oar hit the coarse keyboard on the cupboard aboard the boat.
    轰鸣的桨击中了船上碗柜上的粗糙键盘
  4. My intimate mate’s ultimate estimate approximates the appropriate value.
    我亲密伙伴的最终估计接近恰当的值
  5. In case of necessity, necessary session can be held on the vessel.
    必要时 必需的开庭可在船舶上进行
  6. By the navigation of microwave, the navy paved a pavement on the wavy sea.
    借助微波导航,海军在多浪的大海上铺了一条路。
  7. The minority of us are confronted with difficulty in the frontier of the major.
    我们少数人在该专业尖端领域面临困难
  8. From the context of the text, I find the next pretext for selling the textile.
    我从课文的前后关系中找到卖纺织品的下一个借口
  9. The systematic items stem from the walker’s talk about the chalk.
    这些系统的条款来源于步行者关于粉笔的谈话
  10. Theoretically, their heir’s theory of meteorology can explain the meteor.
    从理论上讲,他们的继承人的气象理论能解释这种大气现象。
  11. I affirmatively confirmed the conformity of the theory with practice.
    我断然确认了理论与实践相符
  12. The subordinate coordinates are in accordance with that set by the cordial chorus.
    从属坐标与热心的合唱团的设定值一致。
  13. The transactor thinks activating the atomic interaction in the intact reactor is practicable.
    办理人认为激活未受影响的反应堆内原子的相互作用是种可行的
  14. The distracted reader can’t be absorbed in the abstract extract.
    心神纷乱的读者无法专心于抽象的节录
  15. The compact faction fractured because of friction.
    紧密小宗派由于摩擦破裂了
  16. Under the guideline, the output of streamlined seamless liners declines linearly.
    在该方针的指引下 流线型无缝班机的产量直线下降
  17. The dreadful tread on the meadow broke the deadly deadlock.
    草场上可怕的践踏声打破了致命的僵局
  18. The heading i s “Headline of Headlong Pleadings”.
    标题为“仓促答辩状的摘要”
  19. I overhear that the hearty man heartily yearns for my harness in the barn.
    我无意中听说那个热忱的人十分向往我的牲口棚中的马具
  20. After the rehearsal, the weary mechanic repaired the gears with shears and spear.
    排练完后,疲 倦的机修工用剪刀和矛修理了齿轮装置
  21. Having checked the parameters of the apparatus, the paralyzed parasite went to the paradise by parachute.
    检查过仪器的参数后 瘫痪的寄生虫乘降落伞到天堂去了
  22. In the compartment, the impartial participant told me his counterpart’s departure.
    在隔间里 公正 的参与者把其对等人物的离世告诉了我
  23. The articulate man’s artistic cartoon startled the charterer.
    发音清晰者的艺术卡通使包租人大吃一惊
  24. The guardian found a quarterly quart of quartz in the safeguard.
    监护人在安全装置内找到了四分之一夸脱石英
  25. The immortal man’s mortgage can be a shortcut to resolve the food shortage.
    不朽之人的抵押可以作为解决食品短缺的捷径
  26. The escort resorted to the orthodox paradox to retort his distortion.
    陪护者借助正统悖论反驳他的歪曲
  27. The oppressor suppressed his aggressive opinion about compressor.
    压制者制止了他的有关压缩机的挑衅性观点
  28. The senseless senator’s pretense of consensus caused a sensation. 愚蠢参议员的舆论借口引起了轰动
  29. The conspicuous suspicious pension is in suspension.
    那笔引人注目的可疑养老金被暂停发放
  30. He repents having compensated the dispensable pension for fear of penalty.
    他后悔因害怕处罚而补偿了不必要的养老金
  31. Abundance doesn’t mean redundance. The hound found a profound book on the roundabout.
    充裕并不意味多余 猎犬在旋转木马上找到一本深奥的书
  32. By courtesy of the mourner, he endeavors to devour the nourishing odour.
    承蒙哀悼者同意,他努力吞食滋养气味
  33. The thermal therapy terminated after the terminal germ seminar.
    热疗在期末细菌研讨会后终止了
  34. The terraced terrain near the Mediterranean ferry is terrific.
    地中海渡口附近的台地地形好极了
  35. The consul’s consultant hauled out the assaulter from the vault.
    领事的顾问把袭击者从地窖中拖了出来
  36. The nitrogen atoms combine instantaneously, simultaneously and spontaneously.
    氮原子瞬间同时自动化合
  37. The respectful spectator gave the prospective president a retrospect of the spectacular spectrum.
    恭敬的旁观者对未来的总统回顾了壮观的光谱 景象
  38. The suicides in adjacent area are incidental coincidence.
    邻近区域内的自杀是偶然巧合
  39. His ignorance of her dignity ignited her indignation.
    他对她的高贵的无知点燃了她的愤怒 之火
  40. The man tackling the drawback of the brackets runs a slack snack business.
    那个解决支架缺点的人经营着萧条的小吃生意。
  41. At the turning the turtle met a turkey and made a turnover on the turnips.
    在拐弯处海龟遇见了火鸡,在萝卜上翻了个身
  42. The overthrown president is overwhelmed by the controversy.
    被推翻的总统被辩论降服
  43. The handicapped man got a second hand handout of shorthand handbook beforehand.
    残疾人事先得到了一本二手速记手册施舍品
  44. Hitherto the withering flowers can’t withstand the sunshine notwithstanding my care.
    尽管有我的呵护 这些凋谢的花至今仍经不起阳光
  45. I averted my eyes from the diverse advertisements for the invert converter.
    我把目光从花样繁多的倒置转换器广告上移开
  46. It’s deduced that the induced fluctuation does no good to the reproducing productivity.
    据推断,诱导波动对复制生产率没有好处
  47. In the Catholic cathedral the athlete shouted out his wrath in the athletic oath.
    在天主教大教堂 选手在体育誓言中喊出了他义愤
  48. The destiny of the pest in chestnut is not known before reaching t he destination.
    栗子中害虫的命运在到达目的地之前是未知的。
  49. The wrestler’s testimony manifests that he has large estates.
    角力者的证言表明他有大量房地产
  50. Having attained the entertaining center, the retained man was detained and sustained pain.
    到达娱乐中心后,聘请的男子遭到拘留并经受到痛苦.

800 句(第十五天)

  1. The assessor asserts that he inserted the deserted desserts in the desert with alert.
    估价员断言他把荒废的甜点警惕地插入到了沙漠内。
  2. The abrupt corrupt man had the Xeroxed code corroded in the erosion episode.
    唐突的腐败的男人将被复印的代码侵蚀在一段腐蚀情节中。
  3. The enlightened man highlighted his mighty insight into the fright.
    开明的人在惊骇中突出他有力的洞察力。
  4. I would rather withhold than uphold you unfold the gold foil on the threshold.
    我宁愿拒绝也不支持你在门口(在快要开始的时候)打开金箔。
  5. The imposing man posed as a man of good disposition and disposed of the rubbish.
    使人难忘的人摆出好脾气的姿势然后处理垃圾。
  6. The prose author’s diagnosis discloses that the hose is damaged.
    散文作家的诊断透露这个软管损坏了。
  7. The limping shrimp impulsively implemented the compulsory duty.
    柔软的小虾有推动力地执行被强制的义务。
  8. The implicit implication about the deficit is not explicit.
    关于赤字的含蓄的暗示不清楚。
  9. The degeneration of regenerative gene is exaggerated.
    再生基因的退化(恶化)被夸大了。
  10. The competent petitioner thinks the perpetual impetus is petty.
    有能力的上诉人(请求人)认为永久的动力(刺激)是不重要的。
  11. The superstitious man put the priority on the superficial supersonic superiority.
    迷信的人将优先权放到肤浅的超级(超声波)的自尊(优势)上。
  12. The traitor in strait straightforwardly told me the traits of the bait.
    在窘迫中(苦恼)的叛国者直接地告诉了我诱饵的特征。
  13. The Oriental is proficient in the ingredients.
    东方人精通配料(成分)。
  14. The recipe recipient transiently made the conscientious alien client unconscious.
    处方容器片刻使尽责的外国顾客不省人事。
  15. The rotary agitator irrigated him.
    旋转式搅拌机为他清洗(伤口)。
  16. The counselor bounced up to denounce discount.
    (法律)顾问跳起来公然指责折扣。
  17. The degraded undergraduate upgraded the underlying virus program.
    降级的大学肆业生升级了潜在的病毒程序。
  18. Jail life made the frail retailer avail every snail in the pail.
    监狱生活使虚弱的零售商人帮助每个在桶里的蜗牛。
  19. Deviation in aviation is dangerous. Writing is alleviated via bias on abbreviation.
    飞行中的偏移是危险的。书写通过对缩写的偏爱减轻了。
  20. On the anniversary the versatile poet wrote an adverse verse Virtue versus Evil.
    在周年纪念中,多才多艺的诗人写了一首相反的诗“美德对邪恶”
  21. The recruit made the current circulate in the circuit on the circumference.
    新兵使电流在圆周上的 电路中循环(传播)
  22. In the suitcase, the guitar tutor found the tuition by intuition.
    在手提箱内,吉他家庭教练凭直觉找到学费。
  23. The watchful snatcher dispatched a batch of combatants to the hatch.
    警惕的诱拐者派了一批战士去舱口。
  24. The wretched butcher clutched the needle and stitched it clumsily.
    可怜的(悲惨的,恶劣的)屠夫抓住针然后笨拙地缝它。
  25. The peer’s queer peering is a sheer sneer.
    同等的人的可疑的窥视是一个纯粹的嘲笑。
  26. The currency curriculum made the excursionist incur loss of time and money.
    流通(货币)课程使得旅行者招致了时间和金钱的损失。
  27. The stray betrayer arrayed the sprayers on the road.
    迷路的叛徒在路上排列了喷雾器。
  28. Dust accumulated on the insulated simulator in the desolate lab.
    在荒凉的实验室中,灰尘聚集在绝缘的模拟器上
  29. The inflated balloon indicates a latent inflation on the plateau.
    膨胀的气球预示着在高原上的一个潜在的通过膨胀(膨胀)。
  30. Trivial tribute s constitute the attribute of constituent’s report.
    微不足道的贡品形成(构成)了选举人的报告的属性。
  31. I acutely and resolutely refuted the brutal persecution of mute commuter.
    我尖锐和坚决地反驳了对无声的(沉默的)通勤者的残忍的迫害。
  32. This measure may preclude the exclusive agency from selling crucial crude oil.
    这个措施可以排除对至关重要的原油的销售的独家代理。
  33. He depicted the conviction that contradicted the verdict.
    他叙述(描述)了与裁决相矛盾的定罪。
  34. Magnify the magnitude of the magnetism.
    放大磁力(磁)的量圾。
  35. The deputy chairman of the charity clarified the importance of clarity and purity.
    慈善团体的代理注意阐明了透明和纯洁的重要性。
  36. The tramp from the tram swamped the ham hamburger with shampoo.
    有轨电车的脚步声淹没了带有香波的火腿汉堡。
  37. According to the pamphlet, the current in the amplifier can be amplified to 3 amperes.
    根据这个小册子,在放大器中的电流可以被增强到 3 安培 。
  38. Prolong the sponge along the longitude and latitude at an altitude.
    在一个高度,沿着经度和惟独拉长海绵。
  39. The conservative man made a reservation in the observatory.
    保守的人在天文台做了预约。
  40. The mender recommends me to amend the legend (传说) agenda (议程).
    修理的人建议我改正图例 操作规程。
  41. His comprehensive apprehension about the appendix of the pendulum is obvious.
    他对钟摆的附属品的全面的理解是很明显的。
  42. Elevate the eleventh level to relevant height.
    升高第 11 级到相应的高度。
  43. Thereafter, I adhered to the coherence inherent to the theory.
    从那以后,我 坚持理论的内在一致。
  44. The prophet appropriately appropriated the fund for repairing propeller.
    预言者适当地拨出资金来修理螺旋桨。
  45. I’m baffled why the affiliated man initiated the negotiator into ego.
    我感到困惑,为什么有关联的(附属的)人倡导(促使,发起)谈判代表利己主义。
  46. The radiation radius of the radioactive radium radiator in the stadium is variable.
    有放射性的镭辐射体(散热器)在广场中的辐射半径是可变的。
  47. Snobbish Knob is doing his hobby in the lobby. 势力的 Knob 在大厅做他的业余爱好。
  48. The ass bypassed the guard and assassinated the surpassing ambassador in the embassy.
    笨人 (驴)绕过警卫在大使馆中刺杀了优秀的大使
  49. The corporate bodies collaborate elaborately on producing vibrating evaporator.
    公司的主体精心合作生产振动蒸发器。
  50. The dazzling light from the digital device dizzied me.
    从数字设备中发出的耀眼的(眼花缭乱的)光使我眩晕。

800 句(第十六天)

  1. The extinct exotic bird’s feather contains zinc.
    那种已绝迹的珍奇的鸟的羽毛中含锌
  2. The smuggler shrugged to the bugler hugging the bug in the tugboat.
    走私者对在拖船中拥抱臭虫的号手耸耸肩
  3. The vocation advocate found the word “vocal” and “reciprocal” not in the vocabulary.
    职业倡导者发现“嗓音的”和“交 互的”两词不在词汇表中
  4. Without my aid I’m afraid the maiden would have been raided.
    没有我的帮助我怕少女已遭到袭击。
  5. The slim Muslim reached his climax when he found the axis of the galaxy.
    苗条的穆斯林在发现银河的轴线时达到了 人生的 顶点
  6. Bonus is a stimulus for me to study the silicon in the bacon.
    奖金是我研究薰肉中硅原子的动力
  7. The categories of the lubricated duplicators are intricate.
    那些润滑过的复印机的种类错综复杂
  8. The wagging wasp grasps the crisp clasp for a gasp.
    摇摆的黄蜂抓住脆钩喘息
  9. The reconciled reptiles rest on a fragile tile.
    和解的爬行动物歇在 易碎的瓷砖上
  10. The gossip tossed the mossy blossom fossil.
    爱讲闲话者向上抛长满苔藓的花化石
  11. Test the immune function by immersed dispersion.
    用浸入扩散 法 测试免疫功能
  12. The lateral elite is literally illiterate.
    边上的杰出人物简直是文盲
  13. To abide the abiding bidding, the oxide bidder strides on the seaside.
    为了忍耐无休止的吩咐 氧化物投标者在海滨阔步行走
  14. The tormentor enlarged the engagement garment.
    折磨者加大了订婚服装
  15. The cripple dipped the whip tip into the chip solution nearby his hip.
    跛子将鞭子末端浸入他臀部旁边的芯片溶液中。
  16. The tickler pricked a t ick on the nickname Nickel.
    挠痒者在绰号“镍币”上刺了个勾号。s
  17. The administrator diminished the feminine miniature to minimal size.
    管理员将女性缩样缩减到最小尺寸
  18. The man with mittens intermittently intervened the remittance.
    戴连指手套的人间歇地介入汇款
  19. The scorched couch is put in the porch of epoch.
    被烤焦睡椅放在时代门廊内
  20. The monstrous monarch monopolized monarchy.
    可怕的君主垄断了君主国
  21. The missionary transmitted emission emitted lately.
    传教士传播了新近散发出来的散发物
  22. I’m intent on tentative retention of potential patents.
    我热衷于潜在专利权的暂时保 留
  23. The expelled man repelled billions of rebellions.
    遭到驱逐的男子击退了数十亿次叛乱
  24. The cellar dweller yelled, “Fell the jellyfish burglar!”.
    住地下室的人喊道 打倒海蜇窃贼
  25. The diplomatic diplomas are made in automation in the autonomy.
    外交证书在自治区是自动化生产的。
  26. The enrolled jolly stroller polled on the trolley.
    被招收的快乐的散步者在无轨电车上投票
  27. The contaminated vital vitamin made racial discrimination come to culmination.
    被污染的重要维他命使种族歧视达到极点
  28. The jogger made an analytical analogy between the ecology and geology.
    慢 跑者在生态学和地质学之间进行了分析类比
  29. The alliance enhanced the reliability of the applicable alloy appliances.
    盟友增强了适用的合金用具的可 性
  30. The gigantic panther in pants passed the transition period of heart transplant.
    穿裤子的巨大黑豹度过了心脏移植的过度期
  31. With a clatter, the flatterer shattered the chattering wattmeter in the chaos.
    当啷一声 马屁精在混乱中打碎了格格作响的瓦特表
  32. “Homely food is wholesome,” the comedian said on the dome.
    “家常食品有益于健康,”喜剧作家在拱顶上说
  33. The subtle subscriber found the prescription manuscript.
    敏锐的认购者找到处方原稿
  34. Time is finite and infinite. I defy the indefinite definition.
    时间既是有限的又是无限的 我公然对抗这个模糊的定义 .

[转载]五大算法设计思想

分治法


分治法概念

将一个难以直接解决的大问题,分割成一些规模较小的相同问题,以便各个击破,分而治之。

分治法思想策略

对于一个规模为n的问题,若该问题可以容易地解决(比如说规模n较小)则直接解决,否则将其分解为k个规模较小的子问题,这些子问题互相独立且与原问题形式相同,递归地解这些子问题,然后将各子问题的解合并得到原问题的解。

分治法特征

  1. 该问题的规模缩小到一定的程度就可以容易地解决
  2. 该问题可以分解为若干个规模较小的相同问题,即该问题具有最优子结构性质。
  3. 利用该问题分解出的子问题的解可以合并为该问题的解;
  4. 该问题所分解出的各个子问题是相互独立的,即子问题之间不包含公共的子子问题。

第一条特征是绝大多数问题都可以满足的,因为问题的计算复杂性一般是随着问题规模的增加而增加;
第二条特征是应用分治法的前提它也是大多数问题可以满足的,此特征反映了递归思想的应用;
第三条特征是关键,能否利用分治法完全取决于问题是否具有第三条特征,如果具备了第一条和第二条特征,而不具备第三条特征,则可以考虑用贪心法或动态规划法。
第四条特征涉及到分治法的效率,如果各子问题是不独立的则分治法要做许多不必要的工作,重复地解公共的子问题,此时虽然可用分治法,但一般用动态规划法较好。

分治法基本步骤

1 分解:将原问题分解为若干个规模较小,相互独立,与原问题形式相同的子问题;
2 解决:若子问题规模较小而容易被解决则直接解,否则递归地解各个子问题
3 合并:将各个子问题的解合并为原问题的解。

适用分治法求解的经典问题

  • 1)二分搜索
  • 2)大整数乘法
  • 3)Strassen矩阵乘法
  • 4)棋盘覆盖
  • 5)合并排序
  • 6)快速排序
  • 7)线性时间选择
  • 8)最接近点对问题
  • 9)循环赛日程表
  • 10)汉诺塔

动态规划


动态规划概念

每次决策依赖于当前状态,又随即引起状态的转移。一个决策序列就是在变化的状态中产生出来的,所以,这种多阶段最优化决策解决问题的过程就称为动态规划。

动态规划思想策略

将待求解的问题分解为若干个子问题(阶段),按顺序求解子阶段,前一子问题的解,为后一子问题的求解提供了有用的信息。
在求解任一子问题时,列出各种可能的局部解,通过决策保留那些有可能达到最优的局部解,丢弃其他局部解。依次解决各子问题,最后一个子问题就是初始问题的解。

动态规划特征

能采用动态规划求解的问题的一般要具有3个性质:
(1) 最优化原理:如果问题的最优解所包含的子问题的解也是最优的,就称该问题具有最优子结构,即满足最优化原理。
(2) 无后效性:即某阶段状态一旦确定,就不受这个状态以后决策的影响。也就是说,某状态以后的过程不会影响以前的状态,只与当前状态有关。
(3) 有重叠子问题:即子问题之间是不独立的,一个子问题在下一阶段决策中可能被多次使用到。(该性质并不是动态规划适用的必要条件,但是如果没有这条性质,动态规划算法同其他算法相比就不具备优势)

动态规划基本步骤

(1)分析最优解的性质,并刻画其结构特征。
(2)递归的定义最优解。
(3)以自底向上或自顶向下的记忆化方式(备忘录法)计算出最优值
(4)根据计算最优值时得到的信息,构造问题的最优解

适用动态规划求解的经典问题

  • 矩阵连乘,
  • 走金字塔
  • 最长公共子序列(LCS) ,
  • 最长递增子序列(LIS) ,
  • 凸多边形最优三角剖分 ,
  • 背包问题 ,
  • 双调欧几里得旅行商问题

贪心法


贪心法概念

在对问题求解时,总是做出在当前看来是最好的选择。也就是说,不从整体最优上加以考虑,他所做出的仅是在某种意义上的局部最优解。

贪心法思想策略

贪心算法没有固定的算法框架,算法设计的关键是贪心策略的选择。必须注意的是,贪心算法不是对所有问题都能得到整体最优解,选择的贪心策略必须具备无后效性,即某个状态以后的过程不会影响以前的状态,只与当前状态有关。所以对所采用的贪心策略一定要仔细分析其是否满足无后效性。

贪心法基本步骤

1.建立数学模型来描述问题。
2.把求解的问题分成若干个子问题。
3.对每一子问题求解,得到子问题的局部最优解。
4.把子问题的解局部最优解合成原来解问题的一个解。

软件架构模式

应用场景

单体架构

  • 好处
    • 容易理解、开发、测试
    • 容易部署
    • 合适小范围项目
  • 不足
    • 紧密耦合
    • 容易产生复杂代码
    • 所有子域都一刀切

N-tier

  • Summary
    • 多层次
    • 层适合特殊的任务
    • 层可以在物理上分离
    • 技术层并不是逻辑上的层
    • 技术边界分层
  • Typical: 3层架构
    • 显示层(UI & 单纯的UI逻辑)
    • 逻辑层(业务逻辑)
    • 数据层
  • Advantages
    • 开发独立
    • 易扩展
  • Disadvantages
    • 改动会影响各个层级

Service-Oriented

  • Summary
    • 多服务
    • 每个服务都是一个业务活动
    • 服务可以组合
    • 协议统一标准
    • 企业服务总线
  • Advantages
    • 服务是松散耦合的
    • 可扩展性好
    • 没有功能重复
  • Disadvantages
    • 降低敏捷性和团队自主性
    • 费用比较高
    • 会有许多不同的观点

Microservices

  • Summary
    • 多服务
    • 每个服务都是一个业务活动
    • 以团队形式提供服务
    • 没有重逻辑的企业总线
    • 自动化最大化
  • Advantages
    • 服务是松散耦合的,易于扩展
    • 灵活性高
    • 可靠性高
    • 设计了故障处理机制
  • Disadvantages
    • 边界并不总是清晰的
    • 交互可能会变得很复杂

Serverless

  • Summary
    • Backend as a service
    • Function as a service

peer-to-peer

  • Summary
    • 去中心化
    • 没有固定的连接
    • 动态发现的
  • Advantages
    • 分享资源
    • 节约成本
    • 可缩放
  • Disadvantages
    • 可能存在安全问题
    • 只适用于特殊场景
    • 代码比较重

应用程序架构模式

分层

  • Summary
    • 显示层(UI)
    • 应用层(Translation between UI & busniess)
    • 业务层(Business logic)
    • 持久层(Code to interact with the database)
    • 数据层(Data)
  • Advantages
    • 开发之间容易理解
    • 容易组织代码
  • Disadvantages
    • 可能导致单体应用
    • 需要撰写大量代码

Microkernel

  • Summary
    • 执行任务
    • 工作流
    • 数据处理
    • 浏览界面
    • 图形设计
  • Advantages
    • 灵活
    • 边界清晰
    • 容易分组
    • 运行过程中容易添加和删除功能
  • Disadvantages
    • 核心 API 不一定适应未来的插件
    • 插件可以被信任吗
    • 并不总是清楚什么是属于核心代码

CQRS

  • Summary
    • 命令查询责任分离
    • 2 模式: 读/查询 & 写/命令
    • 允许特定场景查询
    • 有同步要求
    • 与事件源模式不同
  • Advantages
    • 容易查询
    • 更快、更可扩展的读取查询
    • 更容易对接
  • Disadvantages
    • 添加数据比较复杂
    • 有学习曲线
    • 可能数据不一致
    • 最终一致性

Event sourcing

  • Summary
    • 存储事件而不是当前状态
    • Event = 发生在过去的事情
    • Rehydration or replay
  • Advantages
    • 跟踪事件
    • 数据轨迹
    • 业务语言
    • 事件重演
  • Disadvantages
    • 重演事件 和 外部系统
    • 事件结构的变化
    • 快照

CQRS and Event sourcing combined

  • Summary
    • 2个不同的概念
    • 强强联合
    • 它不适用于简单的域,您可以从事件溯源开始,然后再添加 CQRS。
  • Advantages
    • 简单快速查询
    • 可扩展的
    • 事件跟踪
    • 数据轨迹
    • 商业语言
  • Disadvantages
    • 增加复杂度
    • 学习曲线
    • 数据不一致
    • 事件结构变化

UI Patterns

MVC

  • Summary
    • Controller
    • Model
    • View
  • Advantages
    • 关注点分离
    • 并行开发
    • 流行的框架
  • Disadvantages
    • 控制器可能会变得臃肿
    • 不同的定义

MVP

  • Summary
    • View
    • Presenter
    • Model
  • Advantages
    • 对桌面开发友好
    • 关注点分离
    • 测试性好
  • Disadvantages
    • Presenter层变得臃肿
    • 桌面开发不流行
    • MVVM Pattern

MVVM

  • Summary
    • View
    • ViewModel
    • Model
  • Advantages
    • 现代桌面和移动开发友好
    • 关注点分离
    • 测试性好
  • Disadvantages
    • UI过度
    • 难以调试
    • 桌面开发不流行

设计模式

设计模式六大原则

  • 单一职责原则 Single Responsibility Principle

    一个类只负责一个功能领域中的相应职责,或者就一个类而言,应该只有一个引起它变化的原因。

  • 开放封闭原则 Open-Close Priciple

    一个软件实体应当对扩展开放,对修改封闭。软件实体应该尽量在不修改原有代码的情况下进行扩展。

  • 里氏替换原则 Liskove Substitution Principe

    所有引用基类的地方必须能透明的使用其子类的对象。(在软件中将一个基类对象替换成它的子类对象,程序将不会产生任何错误和异常,反过来则不成立,如果一个软件实体使用的是一个子类对象的话,那么它不一定能够使用基类对象。例如:我喜欢动物,那我一定喜欢狗,因为狗是动物的子类;但是我喜欢狗,不能据此断定我喜欢动物,因为我并不喜欢老鼠,虽然它也是动物)

  • 依赖倒置原则 Dependency Inversion Principle

    抽象不应该依赖于细节,细节应该依赖于抽象,要针对接口编程,而不是针对实现编程。(依赖注入(DependencyInjection, DI)的方式注入到其他对象中,依赖注入是指当一个对象要与其他对象发生依赖关系时,通过抽象来注入所依赖的对象。常用的注入方式有三种,分别是:构造注入,设值注入(Setter注入)和接口注入。构造注入是指通过构造函数来传入具体类的对象,设值注入是指通过Setter方法来传入具体类的对象,而接口注入是指通过在接口中声明的业务方法来传入具体类的对象。这些方法在定义时使用的是抽象类型,在运行时再传入具体类型的对象,由子类对象来覆盖父类对象)

  • 接口隔离原则 Interface Segregation Principle

    使用多个专用接口,而不是使用单一的总接口,客户端不应该依赖于那些它不需要的接口。

  • 迪米特法则 Law of Demeter

    一个软件实体应当尽可能少的与其他实体发生互相作用(高内聚,低耦合)。

为什么要多用组合,少用继承

变化部分取出并封装起来,便于以后扩展,而不影响其他部分。要针对接口编程而不是针对实现编程。

一句话常用设计模式

  1. Iterator——迭代器
  2. Adapter(适配器)————换个包装再度利用

◎ 万事交给子类:

  1. Template Method(模板方法)————实际处理就交给子类
  2. Factory Method(工厂方法)————建立对象实例交给子类

◎建立对象实例

  1. Singleton(单件)————唯一的对象实例
  2. Prototype(原型)————复制建立对象实例
  3. Builder(生成器)————组合复杂的对象实例
  4. Abstract Factory(抽象工厂)————把相关零件组合成产品

◎切割性思考

  1. Bridge(桥接)————分成功能层次和实现层次
  2. Strategy(策略)————把算法整个换掉

◎一视同仁

  1. Composite(组成)————对容器和内容一视同仁
  2. Decorator(装饰)————对装饰和内容一视同仁

◎在结构中穿梭来去

  1. Visitor(访问者)————在结构中穿梭还同时做事
  2. Chain of Responsibility(职责链)————责任转送

◎简单最好

  1. Facade(外观)————单一窗口
  2. Mediator(中介者)————只要面对一个顾问

◎管理状态

  1. Observer(观察者)————通知状态变化
  2. Memento(备忘录)————存储状态
  3. State(状态)————以类表示状态

◎精简不浪费

  1. Flyweight(享元)————有相同的部分就分享,采取精简政策
  2. Proxy(代理)————要用在建立

◎用类来表示

系统分析与设计

1. 定义问题与归结模型

1.1 问题分析

  1. 在问题定义上达成共识 问题概述,影响,结果,优点
  2. 理解问题的本质 因果鱼骨图(将问题写在右边的方框里,确定问题潜在原因的主要类别,用头脑风暴法寻找原因并归类)
    帕累托图(明确问题,找出问题原因,选择评价标准和考察期限,收集各种原因发生的频率与费用数据,将原因按照发生的频率排列,将原因横轴频率纵轴)
    确定项目干系人和用户
    定义系统边界(上下文范围图,用例模型)
    确定系统实现的约束

1.2 问题定义

  • 目标(优势,度量,合理性,可行性,可达成性)
  • 功能需求(注意二义性【同名异义词,代词】)
  • 非功能需求(感官需求,易用性需求,性能需求,可操作性需求,可维护性和可移植性需求,安全性需求,文化和政策需求,法律需求,)

2 需求分析与软件设计

2.1 需求分析的任务与过程

  • 问题识别,分析与综合,编制需求分析的文档,需求分析与评审
  • 分类:功能需求,非功能需求,设计约束,业务需求,用户需求,系统需求
  • 需求工程:开发,管理
  • 分析方法:结构化分析方法,软系统方法,面向对象分析方法,面向问题分析

2.2 如何进行系统设计

2.3 软件设计的任务与活动

3 架构化分析与设计

是一种面向数据流的需求分析和设计方法,适用与分析设计大型数据处理系统

3.1 结构化分析

  • 结构化分析工作步骤:研究“物质环境“;建立系统逻辑模型;划清人机界限
  • 数据流图:过程;外部实体;数据存储;数据流;实时连接;
  • 细化几率DFD部件

3.2 结构化设计

  • 概要设计与详细设计的主要任务;
  • 结构图;
  • 程序流程图和盒图;
  • PAD和PDL

3.3 模块设计

  • 信息隐蔽原则
  • 模块独立性原则

4 面向对象的分析与设计

4.1 面向对象的基本概念

  • 对象与类:实体类,控制类,边界类
  • 继承与泛化
  • 多态与重载
  • 模版类
  • 消息与消息通信

4.2 面向对象分析

OOA/OOD方法

  • 5个层次:主题,对象类,结构,属性,服务
  • 5个步骤:标识对象类,标识结构与关联,划分主题,定义属性,定义服务
  • 4个部分:设计问题域部分,设计人机交互部件,设计任务管理部分,设计数据管理部分

Booch方法

  • 4个步骤:标识类和对象,确定类和对象的含义,标识关系,说明类的接口和实现

OMT方法

  • 三大模型:对象模型,动态模型,功能模型

OOSE方法

4.3 统一建模语言

UML设计与基本概念

.NET CORE

概述

谈一谈对DDD的理解

DDD,领域驱动设计。就是通过领域来指导软件设计,是一种十分抽象的软件设计思想,它主要分为战略设计和战术设计。

战略方面,通过事件风暴进行领域模型的划分,划分出核心域,子域,支撑域,定义通用语言,划分出界限上下文。
在战术设计方面,ddd将架构分层,“松耦合,高内聚”是架构设计的整体思想。按照DDD思想,可以分为领域层,基础设施层,应用层,接口层。

接口层为前端用户提供api接口。基础设施层可以放一些第三方的服务,数据库连接等内容。
应用层是对领域服务的编排,是很薄的一层(目前我自己的架构,应用的是cqrs,所有的相关逻辑都是放在了应用层,而领域层只是放了实体,因为暂时还不是特别理解领域层的服务和事件都应该写什么)。
领域层包括实体,值对象,聚合根,领域服务,领域事件等内容。

ASP.NET Core 比 ASP.NET 更具优势的地方是什么

  1. 跨平台
  2. 对框架没有依赖
  3. 处理请求效率更高
  4. 可以自我寄宿
  5. 轻量高性能
  6. 可以使用vs;vs code进行开发

ASP.NET Core 主要的特性有哪些

  1. startup 类
  2. 依赖关系注入(服务)
  3. 中间件
  4. 主机
  5. 服务器
  6. appsettings.json 配置
  7. 选项
  8. 环境(dev,stage,prod)
  9. Logging
  10. 路由
  11. 处理错误
  12. 发送HTTP请求
  13. 静态文件

Startup

什么是dot net core的startup class

Startup class是dot net core应用的入口。
所有的dot net core应用必须有这个class。这个类用来配置应用。
这个类的调用是在program main函数里面进行配置的。类的名字可以自己定义。

如何在controller中注入service

ConfigureServices 添加 Service;

services.TryAddTransient<IDataAccess, DataAccess>();

在controller 添加注入