Soyuliasoyulia.hashnode.dev·Aug 20, 2024[백준] 1158 - 요세푸스 (with. Python)💡문제 분석 요약 -- 문제 -- 입력 : N, K(<=N) 1 부터 N 까지 원을 이룸 순서대로 K번째 사람을 제거 N명의 사람이 모두 제거될 때까지 계속 진행 즉, 요세푸스 순열은 원에서 사람들이 제거되는 순서 (N, K) 💡알고리즘 설계 input을 통해 N, K 입력 사람 리스트, 결과 리스트 생성 사람들이 다 나갈 때 까지 반복문 생성 popleft로 사람 리스트에 넣어주고 인덱스 2번 자리 값은 결과 리스트로 넣어...Discuss1158
Chetan Dattachetan77.hashnode.dev·Aug 17, 2024239. Sliding Window MaximumProblem You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one posi...DiscussLeetcodesliding window maximum
Mahak Pandeymahakpandeyofficial.hashnode.dev·Jul 4, 2024Top Queue Implementation Techniques You Should Know in Java.When choosing the best method to implement a queue in Java, it depends on the specific requirements of your application. Different Queue implementations in the Java Collections Framework (JCF) offer various advantages and trade-offs. Let’s explore so...Discuss·10 likesJCF
Chetan Dattachetan77.hashnode.dev·Jun 9, 202420 Java - Queue (Deque), List, LinkedList, Vector, and StackDeque Stands for Double Ended Queue. Means addition and removal can be done from both the sides of the queue. Methods available in Deque Interface Queue: add(), offer(), remove(), poll(), element(), peek() Deque: Note Using these methods, we can ...Discuss·29 readsJavadeque
Preetika Prakashpreetikaprakash.hashnode.dev·Jul 31, 2023DSA Day 65/100Topic: Deque Questions Successfully Completed: 1 1) Deque ImplementationEasy QuestionInput: 5 pf 5 pf 10 pb 6 f pp_b Output: 10 Explanation: 1. After push front deque will be {5} 2. After push front deque will be {10, 5} 3. After push back deque wil...Discuss100DaysOfCode