Skip to content
#

Algorithm

Algorithms are detailed sets of guidelines created for a computer program to complete tasks efficiently and thoroughly.

Here are 12,445 public repositories matching this topic...

Boiarshinov
Boiarshinov commented Jun 21, 2022

MinHeap and MaxHeap implementation are broken.
Instance of these heaps couldn't be instanciated with any not empty list of elements.

Here is a test code to reproduce:

@Test
void createFromList() {
    var elements = List.of(
            new HeapElement(5)
    );
    MaxHeap heap = new MaxHeap(elements);
    //similar with MinHeap
}

Stacktrace:

java.lang.IndexOut

📚 C/C++ 技术面试基础知识总结,包括语言、程序库、数据结构、算法、系统、网络、链接装载库等知识及面试经验、招聘、内推等信息。This repository is a summary of the basic knowledge of recruiting job seekers and beginners in the direction of C/C++ technology, including language, program library, data structure, algorithm, system, network, link loading library, interview experience, recruitment, recommendation, etc.

  • Updated Mar 18, 2022
  • C++
cosmos
tech-interview-for-developer
jiriboy
jiriboy commented Jul 7, 2022

안녕하세요

자료 보면서 공부하다가 counting sort 코드가 이상한 부분이 있어서 수정했습니다

  1. 과정 3에서 누적합을 만들어줄 때 arr.length -> counting.length
  2. 과정 4에서 다시 sorted_arr에 넣어줄 때 인덱스가 counting[arr[i]] -> counting[arr[i]] - 1

좋은자료 항상 감사합니다 :)

good first issue
Wikipedia
Wikipedia