[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"me":3,"catalog:en:backend\u002Frs-ownership-borrowing-lifetimes":4,"config":274},null,{"field_key":5,"field_name":6,"seniority":7,"topic_key":8,"topic_name":9,"spec_key":7,"spec_name":7,"locale":10,"cell_total":11,"field_total":12,"seniorities":13,"topics":17,"specs":166,"samples":189},"backend","Backend","","rs-ownership-borrowing-lifetimes","Rs Ownership Borrowing Lifetimes","en",75,3750,[14,15,16],"junior","mid","senior",[18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99,102,105,108,111,114,117,120,123,126,129,132,135,138,141,144,147,150,153,156,157,160,163],{"key":19,"name":20,"count":11},"api-design","API Design",{"key":22,"name":23,"count":11},"caching","Caching",{"key":25,"name":26,"count":11},"concurrency","Concurrency",{"key":28,"name":29,"count":11},"csharp-concurrency-async","Csharp Concurrency Async",{"key":31,"name":32,"count":11},"csharp-exceptions","Csharp Exceptions",{"key":34,"name":35,"count":11},"csharp-generics-interfaces","Csharp Generics Interfaces",{"key":37,"name":38,"count":11},"csharp-memory-performance","Csharp Memory Performance",{"key":40,"name":41,"count":11},"csharp-stdlib-http","Csharp Stdlib Http",{"key":43,"name":44,"count":11},"csharp-testing-tooling","Csharp Testing Tooling",{"key":46,"name":47,"count":11},"databases-sql","Databases \u002F SQL",{"key":49,"name":50,"count":11},"go-concurrency","Go Concurrency",{"key":52,"name":53,"count":11},"go-errors","Go Errors",{"key":55,"name":56,"count":11},"go-interfaces-generics","Go Interfaces Generics",{"key":58,"name":59,"count":11},"go-memory-performance","Go Memory Performance",{"key":61,"name":62,"count":11},"go-stdlib-http","Go Stdlib Http",{"key":64,"name":65,"count":11},"go-testing-tooling","Go Testing Tooling",{"key":67,"name":68,"count":11},"java-concurrency","Java Concurrency",{"key":70,"name":71,"count":11},"java-exceptions","Java Exceptions",{"key":73,"name":74,"count":11},"java-generics-interfaces","Java Generics Interfaces",{"key":76,"name":77,"count":11},"java-memory-jvm","Java Memory Jvm",{"key":79,"name":80,"count":11},"java-stdlib-http","Java Stdlib Http",{"key":82,"name":83,"count":11},"java-testing-tooling","Java Testing Tooling",{"key":85,"name":86,"count":11},"messaging-queues","Messaging \u002F Queues",{"key":88,"name":89,"count":11},"networking-http","Networking \u002F HTTP",{"key":91,"name":92,"count":11},"nodejs-error-handling","Nodejs Error Handling",{"key":94,"name":95,"count":11},"nodejs-event-loop-async","Nodejs Event Loop Async",{"key":97,"name":98,"count":11},"nodejs-memory-performance","Nodejs Memory Performance",{"key":100,"name":101,"count":11},"nodejs-modules-streams","Nodejs Modules Streams",{"key":103,"name":104,"count":11},"nodejs-stdlib-http","Nodejs Stdlib Http",{"key":106,"name":107,"count":11},"nodejs-testing-tooling","Nodejs Testing Tooling",{"key":109,"name":110,"count":11},"php-concurrency-async","Php Concurrency Async",{"key":112,"name":113,"count":11},"php-exceptions","Php Exceptions",{"key":115,"name":116,"count":11},"php-generics-interfaces","Php Generics Interfaces",{"key":118,"name":119,"count":11},"php-memory-performance","Php Memory Performance",{"key":121,"name":122,"count":11},"php-stdlib-http","Php Stdlib Http",{"key":124,"name":125,"count":11},"php-testing-tooling","Php Testing Tooling",{"key":127,"name":128,"count":11},"python-concurrency-async","Python Concurrency Async",{"key":130,"name":131,"count":11},"python-errors-context","Python Errors Context",{"key":133,"name":134,"count":11},"python-memory-performance","Python Memory Performance",{"key":136,"name":137,"count":11},"python-stdlib-http","Python Stdlib Http",{"key":139,"name":140,"count":11},"python-testing-tooling","Python Testing Tooling",{"key":142,"name":143,"count":11},"python-typing-oop","Python Typing Oop",{"key":145,"name":146,"count":11},"rs-async-runtime-futures","Rs Async Runtime Futures",{"key":148,"name":149,"count":11},"rs-concurrency-send-sync","Rs Concurrency Send Sync",{"key":151,"name":152,"count":11},"rs-error-handling-result-option","Rs Error Handling Result Option",{"key":154,"name":155,"count":11},"rs-memory-smart-pointers-unsafe","Rs Memory Smart Pointers Unsafe",{"key":8,"name":9,"count":11},{"key":158,"name":159,"count":11},"rs-traits-generics-dispatch","Rs Traits Generics Dispatch",{"key":161,"name":162,"count":11},"security","Security",{"key":164,"name":165,"count":11},"testing","Testing",[167,171,174,177,180,183,186],{"key":168,"name":169,"count":170},"csharp","C#\u002F.NET",450,{"key":172,"name":173,"count":170},"go","Go",{"key":175,"name":176,"count":170},"java","Java",{"key":178,"name":179,"count":170},"nodejs","Node.js",{"key":181,"name":182,"count":170},"php","PHP",{"key":184,"name":185,"count":170},"python","Python",{"key":187,"name":188,"count":170},"rust","Rust",[190,208,221,235,248,261],{"id":191,"topic":9,"difficulty":192,"body":193,"options":194,"correct_key":202,"explanation":207},"01a0608e-d30c-7b20-b165-1673e004812f",1,"```rust\nfn main() {\n    let s = String::from(\"hi\");\n    let t = s;\n    println!(\"{} {}\", s, t);\n}\n```\nWhat does the compiler report?",[195,198,201,204],{"key":196,"text":197},"a","It prints `hi hi`; `let t = s` copies the string bytes into `t`",{"key":199,"text":200},"b","Error E0499: `s` and `t` are two mutable owners of the same heap buffer",{"key":202,"text":203},"c","Error E0382: `s` was moved into `t` and is used afterwards",{"key":205,"text":206},"d","It compiles and prints `hi` once; `s` becomes an empty string after the assignment","`String` owns a heap buffer and is not `Copy`, so `let t = s` moves ownership to `t`. The compiler then rejects the later read of `s` with E0382 (borrow of moved value). Nothing is copied and `s` does not become empty; it is simply no longer usable.",{"id":209,"topic":9,"difficulty":192,"body":210,"options":211,"correct_key":196,"explanation":220},"01a0608e-d30d-77db-96e2-4eae6cd92542","```rust\nfn main() {\n    let a = 5;\n    let b = a;\n    println!(\"{} {}\", a, b);\n}\n```\nWhat happens?",[212,214,216,218],{"key":196,"text":213},"It compiles and prints `5 5`; `i32` is `Copy`, so `a` stays valid after `b = a`",{"key":199,"text":215},"Error E0382; `a` is moved into `b` exactly like a `String` binding would be",{"key":202,"text":217},"It prints `5 5` only because the constant is folded; a runtime value would be moved",{"key":205,"text":219},"Error E0502; `b` holds a shared borrow of `a` while `println!` requests another one","Integer types implement `Copy`, so assignment copies the bits and both bindings remain usable. Whether the value is a constant or computed at runtime makes no difference; the rule depends only on the type.",{"id":222,"topic":9,"difficulty":223,"body":224,"options":225,"correct_key":205,"explanation":234},"01a0608e-d30e-7675-8bd3-875d559a24c0",2,"```rust\nfn consume(s: String) -> usize {\n    s.len()\n}\n\nfn main() {\n    let s = String::from(\"hello\");\n    let n = consume(s);\n    println!(\"{} {}\", n, s);\n}\n```\nWhat does the compiler say, and what is the idiomatic fix when the callee only needs to read the string?",[226,228,230,232],{"key":196,"text":227},"It prints `5 hello`; arguments are passed as a copy of the pointer, so `s` is untouched",{"key":199,"text":229},"E0505: `consume` keeps a borrow of `s` alive until the function returns",{"key":202,"text":231},"It prints `5 hello`; ownership returns to the caller automatically when `consume` finishes",{"key":205,"text":233},"E0382 at the `println!`; change the parameter to `&str` and call `consume(&s)` instead","A `String` parameter takes ownership, so `consume(s)` moves `s` and the later `println!` is E0382. Ownership does not come back on return unless the function returns the value. Borrowing (`&str` or `&String`) lets the caller keep using `s`.",{"id":236,"topic":9,"difficulty":192,"body":237,"options":238,"correct_key":199,"explanation":247},"01a0608e-d30f-76f2-ba4f-c74ae94bd06c","```rust\nfn len(s: &String) -> usize {\n    s.len()\n}\n\nfn main() {\n    let s = String::from(\"hello\");\n    let n = len(&s);\n    println!(\"{} {}\", n, s);\n}\n```\nWhat is printed?",[239,241,243,245],{"key":196,"text":240},"Nothing; the program fails with E0382 at the `println!` line",{"key":199,"text":242},"It compiles and prints `5 hello`; `&s` only lends the string to `len`",{"key":202,"text":244},"`5` followed by a panic; the borrow is released when `len` returns and `s` is freed",{"key":205,"text":246},"`5 ` with an empty string; a shared borrow moves the heap buffer temporarily","Passing `&s` creates a shared reference; ownership never leaves `main`. When `len` returns, the borrow simply ends and `s` is still fully usable. The value is neither moved nor freed.",{"id":249,"topic":9,"difficulty":223,"body":250,"options":251,"correct_key":205,"explanation":260},"01a0608e-d310-7509-8e96-a3ce3358f632","```rust\nfn add(s: &mut String) {\n    s.push('!');\n}\n\nfn main() {\n    let s = String::from(\"hi\");\n    add(&mut s);\n    println!(\"{}\", s);\n}\n```\nWhat does the compiler report?",[252,254,256,258],{"key":196,"text":253},"E0499: `add` and `println!` both need a mutable borrow of `s` at the same time",{"key":199,"text":255},"It compiles and prints `hi!`; `&mut` on the call site is what makes a binding mutable",{"key":202,"text":257},"E0382: `&mut s` moves the string into `add`, so the later print uses a moved value",{"key":205,"text":259},"E0596: cannot borrow `s` as mutable because the binding is not declared `mut`","Taking `&mut s` requires that `s` itself be declared with `let mut`. The compiler rejects the call with E0596. Adding `mut` to the declaration makes it compile and print `hi!`; a mutable borrow does not move the value.",{"id":262,"topic":9,"difficulty":223,"body":263,"options":264,"correct_key":196,"explanation":273},"01a0608e-d312-74c7-b957-502ace8c852d","```rust\nfn main() {\n    let mut s = String::from(\"hi\");\n    let a = &mut s;\n    let b = &mut s;\n    a.push('a');\n    b.push('b');\n    println!(\"{}\", s);\n}\n```\nWhat happens?",[265,267,269,271],{"key":196,"text":266},"E0499: `b` is a second mutable borrow of `s` while `a` is still used later",{"key":199,"text":268},"It compiles and prints `hiab`; two `&mut` are fine as long as they are used one after another",{"key":202,"text":270},"E0502: `println!` takes a shared borrow while `a` and `b` are mutable borrows",{"key":205,"text":272},"It prints `hib`; the second `&mut` replaces the first one","Only one mutable borrow may be live at a time. `a` is still used after `b` is created, so both are live at `let b = &mut s`, and the compiler reports E0499. If `a.push('a')` came before `let b`, the first borrow would have ended and the code would compile.",{"fields":275,"seniorities":495,"interview_shapes":496,"locales":503,"oauth":505,"question_count":508,"coach_enabled":509,"jd_match_enabled":509},[276,288,308,326,350,363,382,401,421,440,455,477],{"key":5,"name_tr":6,"name_en":6,"sort":192,"specializations":277},[278,281,282,283,284,285,286,287],{"key":279,"name":280,"field":5},"general","Genel",{"key":172,"name":173,"field":5},{"key":184,"name":185,"field":5},{"key":175,"name":176,"field":5},{"key":168,"name":169,"field":5},{"key":178,"name":179,"field":5},{"key":181,"name":182,"field":5},{"key":187,"name":188,"field":5},{"key":289,"name_tr":290,"name_en":290,"sort":223,"specializations":291},"frontend","Frontend",[292,293,296,299,302,305],{"key":279,"name":280,"field":289},{"key":294,"name":295,"field":289},"javascript","JavaScript",{"key":297,"name":298,"field":289},"typescript","TypeScript",{"key":300,"name":301,"field":289},"react","React",{"key":303,"name":304,"field":289},"vue","Vue",{"key":306,"name":307,"field":289},"angular","Angular",{"key":309,"name_tr":310,"name_en":310,"sort":311,"specializations":312},"fullstack","Fullstack",3,[313,314,315,316,317,318,319,320,321,322,323,324,325],{"key":279,"name":280,"field":309},{"key":172,"name":173,"field":5},{"key":184,"name":185,"field":5},{"key":175,"name":176,"field":5},{"key":168,"name":169,"field":5},{"key":178,"name":179,"field":5},{"key":181,"name":182,"field":5},{"key":187,"name":188,"field":5},{"key":294,"name":295,"field":289},{"key":297,"name":298,"field":289},{"key":300,"name":301,"field":289},{"key":303,"name":304,"field":289},{"key":306,"name":307,"field":289},{"key":327,"name_tr":328,"name_en":328,"sort":329,"specializations":330},"devops-cloud","DevOps \u002F Cloud",4,[331,332,335,338,341,344,347],{"key":279,"name":280,"field":327},{"key":333,"name":334,"field":327},"aws","AWS",{"key":336,"name":337,"field":327},"gcp","GCP",{"key":339,"name":340,"field":327},"azure","Azure",{"key":342,"name":343,"field":327},"kubernetes","Kubernetes",{"key":345,"name":346,"field":327},"terraform","Terraform",{"key":348,"name":349,"field":327},"linux","Linux",{"key":351,"name_tr":352,"name_en":352,"sort":353,"specializations":354},"ai-engineer","AI Engineer",5,[355,356,357,360],{"key":279,"name":280,"field":351},{"key":184,"name":185,"field":351},{"key":358,"name":359,"field":351},"llm-rag","LLM\u002FRAG",{"key":361,"name":362,"field":351},"mlops","MLOps",{"key":364,"name_tr":365,"name_en":366,"sort":367,"specializations":368},"database","Veritabanı","Database",6,[369,370,373,376,379],{"key":279,"name":280,"field":364},{"key":371,"name":372,"field":364},"postgresql","PostgreSQL",{"key":374,"name":375,"field":364},"mysql","MySQL",{"key":377,"name":378,"field":364},"mongodb","MongoDB",{"key":380,"name":381,"field":364},"redis","Redis",{"key":383,"name_tr":384,"name_en":385,"sort":386,"specializations":387},"mobile","Mobil","Mobile",7,[388,389,392,395,398],{"key":279,"name":280,"field":383},{"key":390,"name":391,"field":383},"ios-swift","iOS (Swift)",{"key":393,"name":394,"field":383},"android-kotlin","Android (Kotlin)",{"key":396,"name":397,"field":383},"flutter","Flutter",{"key":399,"name":400,"field":383},"react-native","React Native",{"key":161,"name_tr":402,"name_en":162,"sort":403,"specializations":404},"Güvenlik",8,[405,406,409,412,415,418],{"key":279,"name":280,"field":161},{"key":407,"name":408,"field":161},"appsec","AppSec",{"key":410,"name":411,"field":161},"offensive-pentest","Offensive \u002F Pentest",{"key":413,"name":414,"field":161},"cloud-security","Cloud Security",{"key":416,"name":417,"field":161},"devsecops","DevSecOps",{"key":419,"name":420,"field":161},"blue-team-incident","Blue Team \u002F Incident",{"key":422,"name_tr":423,"name_en":424,"sort":425,"specializations":426},"qa-test-automation","QA \u002F Test Otomasyonu","QA \u002F Test Automation",9,[427,428,431,434,437],{"key":279,"name":280,"field":422},{"key":429,"name":430,"field":422},"test-automation","Test Automation",{"key":432,"name":433,"field":422},"sdet","SDET",{"key":435,"name":436,"field":422},"performance-testing","Performance Testing",{"key":438,"name":439,"field":422},"mobile-qa","Mobile QA",{"key":441,"name_tr":442,"name_en":442,"sort":443,"specializations":444},"data-engineer","Data Engineer",10,[445,446,449,452],{"key":279,"name":280,"field":441},{"key":447,"name":448,"field":441},"pipelines-etl","Pipelines \u002F ETL",{"key":450,"name":451,"field":441},"streaming","Streaming",{"key":453,"name":454,"field":441},"warehousing","Warehousing",{"key":456,"name_tr":457,"name_en":458,"sort":459,"specializations":460},"game-dev","Oyun Geliştirme","Game Development",11,[461,462,465,468,471,474],{"key":279,"name":280,"field":456},{"key":463,"name":464,"field":456},"unity-csharp","Unity (C#)",{"key":466,"name":467,"field":456},"unreal-cpp","Unreal (C++)",{"key":469,"name":470,"field":456},"gameplay","Gameplay",{"key":472,"name":473,"field":456},"graphics-rendering","Graphics \u002F Rendering",{"key":475,"name":476,"field":456},"multiplayer-netcode","Multiplayer \u002F Netcode",{"key":478,"name_tr":479,"name_en":479,"sort":480,"specializations":481},"ml-engineer","ML Engineer",12,[482,483,486,489,492],{"key":279,"name":280,"field":478},{"key":484,"name":485,"field":478},"classical-ml","Classical ML",{"key":487,"name":488,"field":478},"feature-engineering","Feature Engineering",{"key":490,"name":491,"field":478},"deep-learning","Deep Learning",{"key":493,"name":494,"field":478},"training-infrastructure","Training Infrastructure",[14,15,16],{"junior":497,"mid":499,"placement":500,"senior":502},{"questions":498,"median_sec":3},20,{"questions":498,"median_sec":3},{"questions":501,"median_sec":3},24,{"questions":498,"median_sec":3},[504,10],"tr",[506,507],"google","github",29400,true]