1. while the array is larger than the target number of variable:"searchFor" , it is no need to search for the result that is larger than the "search target", therefore, we should break the loop to save more resources.
2. the variable j in the statement of "System.out.println("i = " + j); " is not declare and initialize at the beginning, also, var j in the while loop does not match with the variable i which is the result we want to display. Therefore, this statement should correct to "System.out.println("i = " + i); " so as to display the result of each loop correctly.
* Completed c++ implemetation
c++ implementation contained only merge function(by the name of merge sort). Completed the implementation by providing both divide and merge functions.
* fix: add triple backticks for c# code
* fix: changed csharp to cpp
* Changed the file to reflect standards
`goto` is generally discouraged for use in C++, which wasn't what this was saying. Dijkstra even [said](http://www.u.arizona.edu/~rubinson/copyright_violations/Go_To_Considered_Harmful.html), "The go to statement as it stands is just too primitive; it is too much an invitation to make a mess of one's program." in 1968. This file seemed to indicate the opposite.
* fix: fixed grammar
* Added "Note" and "Usage with common data types"
Added detailed information about the workings of 'is' and '==' operators with common data types. Included a simple coding example for each case and explained the reasons (for most cases) of why these operators work in this fashion and how they work under the hood.
* Minor changes to previous commit.
* fix: removed extra backticks
* added basic info about type safety and optionals
* add link for optionals, renamed links and title
also renamed the directory folder
* added basic info about type safety and optionals
added optionals link and renamed links and directory
* added basic info about type safety and optionals
added optionals link and renamed links and directory
* added basic info about type safety and optionals
also added "swift optionals" link and renamed original link to "type safety and type inference" and also renamed directory
* added basic info about optionals
added link to swift optionals and change the name of the first link and the directory
* added info on swift optionals
renamed links and directory folder
* added info about type safety and optionals
added a link to swift optionals and change folder name and a link's name to type safety and inference
* added info about optionals
added a link to optionals docs, change link and folder name to "type safety and inference", similarly with the title tag
* Update index.md
* Update index.md
* added info on swift optionals and type safety
altered link and directory names and added a link to optionals docs
* added info for swift type-safety and optionals
changed link and directory name to type safe and inference
added link to swift optionals doc
* Update guide/english/swift/type-safety-and-inference/index.md
Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
* Update guide/english/swift/type-safety-and-inference/index.md
Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
* Update guide/english/swift/type-safety-and-inference/index.md
Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
* Update guide/english/swift/type-safety-and-inference/index.md
Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
* Update guide/english/swift/type-safety-and-inference/index.md
Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
* Update guide/english/swift/type-safety-and-inference/index.md
Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
* Update guide/english/swift/type-safety-and-inference/index.md
Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
* changed the directory name to match the title
* modified folder name to have the proper format :-)
* added info about swift dictionaries
* added info for swift dictionaries
* added info about swift dictionaries
* added basic info on swift dictionaries
* added info about swift dictionaries
* Update index.md
* added info on swift dictionaries
* added info about swift dictionaries
* Update guide/english/swift/dictionaries/index.md
Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
* docs(guide): clean up canvas particle sim code examples
* Use ES6 syntax
* Format code for easy readability
* Normalize single vs. double quotes
* Adjust spacing
* Add link to inverse-square law wikipedia page for additional information
* docs(guide): use arrow functions in particle sim examples
Add text "### Application
1. To find all connected components in a given graph
2. To find the shortest path between two nodes of any weighted or unweighted graph
3. To find all nodes within an individual connected components" to article.
* Update index.md
I have changed the spelling such as missing letters and missing punctuation and while scanning the page, I have also adjusted a few links or coding in and out of brackets.
* Update index.md
* fix: converted single to triple backticks13
* fix: added prefix
Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
* fix: removed language in wrong place
Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
* fix: add language postfix
Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
* fix: removed language in wrong place
Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
* Update index.md
Corrected "its" to "are" in first sentence.
Updated sentence structure in opening paragraph and paragraph prior to More Information section.
Changed "Ux" to "UX" in More Information section
* minor SPG change
* fix: replace imgur with s3 for files with potential conflict
(cherry picked from commit 4ec62c0e29a64b0288eade45fb510f25c622945a)
* fix/remote extra link
Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
* fix: revert change
* Explained top() and dynamic datastructures
Added a brief description of the top() function as there was none. Also talked about the application of dynamic data structures in the implementation of a stack.
* fix: changed c++ to cpp
* Upgraded node image to latest stable, v8.12 in docker compose
* f-strings example with capital letter F
* Example of using f-strings with an object
* Revert "f-strings example with capital letter F"
This reverts commit 8f498480ce.
* Revert "Upgraded node image to latest stable, v8.12 in docker compose"
This reverts commit e55dd116d2.
* feat: fixed header formatting
* fix the command python -m simpleHTTPServer
Change the simpleHTTPserver to simpleHTTPServer, which is the right commmand.
* another capital S had been omitted
Quadratics is plural...?
Added an explanation as to how to factor quadratics, two methods (with examples), one for simple cases and then the general case. Discussed an issue that needs care when using the quadratic formula, as well as an example to make things clear what's going on.
Added lines about how an SSH server can be configured to utilize a second factor authentication method to augment authentication security and how if one's password is compromised, an attacker must compromise this second (or third) factor of authentication too, to gain access.
* Extend solution explanation
The explanation for the advanced code solution was a little cumbersome.
It tried to explain the used method, but also tried to explain an alternative solution, both mixed together.
To fix that, I moved everything related to the alternative solution to another paragraph.
Additionally, I added a more detailed explanation about this alternative solution.
Hopefully, with this fixes, both solutions will be clearer to the user.
* Replace intermediate solution
Replace the intermediate solution with a more concise one.
I took the opportunity to eliminate the indenting in all 3 snippets to remove unnecessary blank space on the left.
I also changed the wording on one of the instructions and fixed a typo.
* Remove external links
* Simplity regex declaration
I replaced `new RegExp()` in order to make the solution cleaner and shorter
* Update index.md
* Modify if statement
Change the solution so an empty string is returned when num is less than 1 rather than less than 0 for consistency with instructions.
* Add test
New test checks that if num is 0, an empty string is returned
* Fix test
Fixing errors in newly proposed test that checks that empty string is returned when num is 0
* Modify intermediate solution
Changing if statement in intermediate solution to check whether num is less than 1 rather than less than 0. (Also adding curly brackets to that solutions if/else statements.)
* fix: removed unnecessary assert message arguments
* Remove random links from code
Seems that these got added by accident.
* Remove errors from solution in Portuguese version
* Remove errors from solution in Spanish version
* Remove errors from solution in Russian version
* Remove errors from solution in Arabic version
* Remove errors from solution in Chinese version
* fix: imgur to s3 for englsh guide without conflict
(cherry picked from commit 9c9f15abf4e755feab79ef7090dacdcf497ea7b6)
* fix: revert unrelated changes
Time Analysis Of AVL Tree:
AVL tree is binary search tree with additional property that difference between height of left sub-tree and right sub-tree of any node can’t be more than 1.
Algorithm Average Worst case
Space O ( n ) {\displaystyle O(n)} O(n) O ( n ) {\displaystyle O(n)} O(n)
Search O ( log n ) {\displaystyle O(\log n)} O(\log n) O ( log n ) {\displaystyle O(\log n)} O(\log n)
Insert O ( log n ) {\displaystyle O(\log n)} O(\log n) O ( log n ) {\displaystyle O(\log n)} O(\log n)
Delete O ( log n ) {\displaystyle O(\log n)} O(\log n) O ( log n ) {\displaystyle O(\log n)} O(\log n)
I ended up modifying the extension list to include the VIM keybind extension for those who want the experience as well as added Customization as one of the main features of the editor.
* Add comments and update callback arguments' names
I've added a few comments to the solution and given the callback arguments more descriptive names to clarify what the solution is doing, since this challenge seemed a little more complex than the previous challenges.
* Update guide/english/certifications/javascript-algorithms-and-data-structures/functional-programming/use-the-reduce-method-to-analyze-data/index.md
That makes absolute sense and is clearer. Thank you.
Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
* Update indentation to be two-spaced
* Added new section
Added a new section for defining what can be returned in custom methods and how to correct a mistake with returns
* Update guide/english/csharp/return/index.md
Co-Authored-By: marcusparsons <marcusparsons@users.noreply.github.com>
* Update guide/english/csharp/return/index.md
Co-Authored-By: marcusparsons <marcusparsons@users.noreply.github.com>
* Update guide/english/csharp/return/index.md
Co-Authored-By: marcusparsons <marcusparsons@users.noreply.github.com>
* Update guide/english/csharp/return/index.md
Co-Authored-By: marcusparsons <marcusparsons@users.noreply.github.com>
* Fixed outdated info
C++98 wasn't the standard for a long time. gnu++14 is the current standard and this pull request corrects that.
* Update index.md
* Updated the attribution to fit Purdue's format.
* fix: replace sh with shell
fix replace terminal with shell
fix replace node with js
fix replace output with shell
fix replace cs with csharp
fix replace c++ with cpp
fix replace c# with csharp
fix replace javasctipt with js
fix replace syntax with js
fix replace unix with shell
fix replace linux with shell
fix replace java 8 with java
fix replace swift4 with swift
fix replace react.js with jsx
fix replace javascriot with js
fix replace javacsript with js
fix replace c++ - with cpp
fix: corrected various typos
fix: replace Algorithm with nothing
fix: replace xaml with xml
fix: replace solidity with nothing
fix: replace c++ with cpp
fix: replace txt with shell
fix: replace code with json and css
fix: replace console with shell
* fix: reworded and moved challenge
* fix: removed extra line
Co-Authored-By: RandellDawson <5313213+RandellDawson@users.noreply.github.com>
* fix; removed extra line
Co-Authored-By: RandellDawson <5313213+RandellDawson@users.noreply.github.com>
* fix: reworded sentence
Co-Authored-By: RandellDawson <5313213+RandellDawson@users.noreply.github.com>
Translated this " FreeCodeCamp is an open-source project that needs your help" to this "FreeCodeCamp es un projecto de codigo abierto que neccesita tu ayuda"
* Added examples for complex numbers to numeric-types article
Introduce 3 examples of what a complex number would look like in Python.
* fix: moved links to bottom
* Adding Time Analysis for B-Trees
Time Analysis for B-Tree:
Suppose a B-tree has n elements and M is the maximum number of children a node can have. What is the maximum depth the tree could have? What is the minimum depth the tree could have?
The worst-case depth (maximum depth) of a B-tree is: logM/2 n.
The best-case depth (minimum depth) of a B-tree is: logM n.
Worst-Case Times for B-Trees:
Adding or removing an element in a B-tree with n elements is O(log n).
* fix: removed duplicate info