-
- edit main function to standard version
- swap function was too inefficient, so I delete it
- array could not be constructed, so I make it by dynamic allocation
- improve interface
In my enviro…
-
_From @ctongfei on June 9, 2017 2:23_
Scala 2.12.2
_Copied from original issue: deeplearning4j/nd4s#108_
-
https://github.com/backside360/algorithms/blob/bfec6151bd39307c09238bfd606c0bca7ef931ef/selectionSort/recursive_Sort.js#L4
-
当N不被M整除的时候可能出现最后剩余的数组没有被正确排序的问题:数组`arr = [2, 1, 4, 3, 5, 7, 4, 2, 1, 3, 6, 7, -1, -2]`,`M = 3`,则-1和-2没有被正确排序。问题出现在对每一块进行单独排序的时候最后一块漏了,并且归并的时候也漏了最后一块。我的算法:
```js
function selectionSort(arr, l, r) {…
-
Using UnityScript2CSharp_1.0.7002.42237
Original JS Code
```js
public function AttachCamerasAutomatically()
{
var tempCameras : kCameraControl[] = new kCameraControl[0];
tempCameras = GameOb…
-
Improve the project organization
Rename the directories of each practice using the format: Practice # - *description*
For example:
Practice 1 - BubbleSort y SelectionSort
Practice 2 - QuickSort
…
-
### 冒泡排序
1. 比较相邻大小, 大的向后冒泡;
2. 循环 n 次这样的操作.
```java
public void bubbleSort(int[] a) {
for (int i = 0; i < a.length; i++) {
for (int j = 0; j < a.length-1-i; j++) {
if (a…
-
I built `sys-plus.bc` according to the instructions in the blog post, but when I ran `llvm-cbe` on it, I got the following error:
```
jared@jared-r15:~/static_compile/test4$ ~/build/llvm/build/Deb…
-
On file `./c/array-memsafety/selectionsort_unsafe_false-valid-deref.i`
-
`a90700e7e28ecc04d950081fb32c0c879e65f82e` (`./c/loops/eureka_05_true-unreach-call_true-termination.i`)
```c
void __DUMMY_VERIFIER_error()
{
}
void __DUMMY_VERIFIER_assert(int condition)
{
}
…