Replace ``js with ``javascript

This commit is contained in:
krahets
2023-02-08 04:27:55 +08:00
parent 0407cc720c
commit 22b7d65d20
27 changed files with 127 additions and 92 deletions

View File

@@ -94,7 +94,7 @@ $$
=== "JavaScript"
```js title="binary_search.js"
```javascript title="binary_search.js"
/* 二分查找(双闭区间) */
function binarySearch(nums, target) {
// 初始化双闭区间 [0, n-1] ,即 i, j 分别指向数组首元素、尾元素
@@ -243,7 +243,7 @@ $$
=== "JavaScript"
```js title="binary_search.js"
```javascript title="binary_search.js"
/* 二分查找(左闭右开) */
function binarySearch1(nums, target) {
// 初始化左闭右开 [0, n) ,即 i, j 分别指向数组首元素、尾元素+1
@@ -400,7 +400,7 @@ $$
=== "JavaScript"
```js title=""
```javascript title=""
// (i + j) 有可能超出 int 的取值范围
let m = parseInt((i + j) / 2);
// 更换为此写法则不会越界

View File

@@ -51,7 +51,7 @@ comments: true
=== "JavaScript"
```js title="hashing_search.js"
```javascript title="hashing_search.js"
/* 哈希查找(数组) */
function hashingSearchArray(map, target) {
// 哈希表的 key: 目标元素value: 索引
@@ -145,7 +145,7 @@ comments: true
=== "JavaScript"
```js title="hashing_search.js"
```javascript title="hashing_search.js"
/* 哈希查找(链表) */
function hashingSearchLinkedList(map, target) {
// 哈希表的 key: 目标结点值value: 结点对象

View File

@@ -49,7 +49,7 @@ comments: true
=== "JavaScript"
```js title="linear_search.js"
```javascript title="linear_search.js"
/* 线性查找(数组) */
function linearSearchArray(nums, target) {
// 遍历数组
@@ -170,7 +170,7 @@ comments: true
=== "JavaScript"
```js title="linear_search.js"
```javascript title="linear_search.js"
/* 线性查找(链表)*/
function linearSearchLinkedList(head, target) {
// 遍历链表