mirror of
https://github.com/mfocko/blog.git
synced 2024-11-14 01:59:42 +01:00
1 line
7.7 KiB
JavaScript
1 line
7.7 KiB
JavaScript
|
"use strict";(self.webpackChunkfi=self.webpackChunkfi||[]).push([[8807],{21431:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var s=t(85893),i=t(11151);const o={id:"seminar-03",title:"3rd seminar",description:"Select sort implementation on arrays.\n",last_update:{date:new Date("2023-03-07T00:00:00.000Z")}},r=void 0,c={id:"bonuses/seminar-03",title:"3rd seminar",description:"Select sort implementation on arrays.\n",source:"@site/c/bonuses/03.md",sourceDirName:"bonuses",slug:"/bonuses/seminar-03",permalink:"/c/bonuses/seminar-03",draft:!1,unlisted:!1,editUrl:"https://github.com/mfocko/blog/tree/main/c/bonuses/03.md",tags:[],version:"current",lastUpdatedAt:1678147200,formattedLastUpdatedAt:"Mar 7, 2023",frontMatter:{id:"seminar-03",title:"3rd seminar",description:"Select sort implementation on arrays.\n",last_update:{date:"2023-03-07T00:00:00.000Z"}},sidebar:"autogeneratedBar",previous:{title:"Bonuses",permalink:"/c/category/bonuses"},next:{title:"4th seminar",permalink:"/c/bonuses/seminar-04"}},a={},l=[{value:"Light version (<code>main_light.c</code>)",id:"light-version-main_lightc",level:2},{value:"Full fat version (<code>main.c</code>)",id:"full-fat-version-mainc",level:2},{value:"Submitting",id:"submitting",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.admonition,{type:"caution",children:(0,s.jsxs)(n.p,{children:["Deadline for the submission of the bonus is ",(0,s.jsx)(n.strong,{children:"March 16th 24:00"}),"."]})}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["In case you have any questions, feel free to reach out either by email, Discord\nor just by submitting an issue ",(0,s.jsx)(n.a,{href:"https://gitlab.fi.muni.cz/xfocko/kb/-/issues/new",children:"here"}),"."]})}),"\n",(0,s.jsxs)(n.p,{children:["This assignment has two versions. For the light version you can get 1.5 K\u20a1. For\nthe ",(0,s.jsx)(n.em,{children:"full fat"})," 3 K\u20a1. ",(0,s.jsx)(n.strong,{children:"You can choose only one of them"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"To both of them you are given some basic tests. You can also have a look at the\ncode used by the tests and use it to your advantage."}),"\n",(0,s.jsx)(n.p,{children:"Details can be found in the doxygen comments included in the source files."}),"\n",(0,s.jsxs)(n.h2,{id:"light-version-main_lightc",children:["Light version (",(0,s.jsx)(n.code,{children:"main_light.c"}),")"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.a,{href:"pathname:///files/c/bonuses/03/main_light.c",children:"Source"})}),"\n",(0,s.jsx)(n.p,{children:"For the light version you have 3 functions to finish:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"swap"})," - that swaps two ints passed by pointers."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"maximum"})," - that returns index of the biggest ",(0,s.jsx)(n.code,{children:"int"})," in the array."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"select_sort"})," - that sorts passed array using Select Sort."]}),"\n"]}),"\n",(0,s.jsxs)(n.h2,{id:"full-fat-version-mainc",children:["Full fat version (",(0,s.jsx)(n.code,{children:"main.c"}),")"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.a,{href:"pathname:///files/c/bonuses/03/main.c",children:"Source"})}),"\n",(0,s.jsx)(n.p,{children:"For the full fat version you have 4 functions to implement:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"swap"})," - that swaps two variables passed by pointers."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"maximum"})," - that returns index of the biggest element in the array using the\ncomparator."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"select_sort"})," - that sorts passed array using Select Sort."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,
|