



  

<!DOCTYPE html>
<html
  lang="en"
  
  data-color-mode="auto" data-light-theme="light" data-dark-theme="dark"
  data-a11y-animated-images="system" data-a11y-link-underlines="true"
  
  >




  <head>
    <meta charset="utf-8">
  <link rel="dns-prefetch" href="https://github.githubassets.com">
  <link rel="dns-prefetch" href="https://avatars.githubusercontent.com">
  <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
  <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">
  <link rel="preconnect" href="https://github.githubassets.com" crossorigin>
  <link rel="preconnect" href="https://avatars.githubusercontent.com">

<script type="importmap">{"imports":{"react":"https://github.githubassets.com/assets/react-e27d1b3e03961e68.js","react-dom":"https://github.githubassets.com/assets/react-dom-e5fd46a22d5c4058.js","react-dom/client":"https://github.githubassets.com/assets/react-dom-client-1b4a3ee065998cea.js","react-is":"https://github.githubassets.com/assets/react-is-e0b593954b4706d8.js","react-reconciler":"https://github.githubassets.com/assets/react-reconciler-8e99e505c4429605.js","react/compiler-runtime":"https://github.githubassets.com/assets/react-compiler-runtime-4610bd6d3de9c049.js","react/jsx-dev-runtime":"https://github.githubassets.com/assets/react-jsx-dev-runtime-ea55d68667d559e5.js","react/jsx-runtime":"https://github.githubassets.com/assets/react-jsx-runtime-4915cb0f5b3aff04.js","scheduler":"https://github.githubassets.com/assets/scheduler-58b860b049ca307c.js"}}</script>
<meta name="react-profiling" content="0" data-turbo-transient="true" />
<meta name="react-import-map" content="react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@777f63f87cd0" data-turbo-track="reload" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/react-e27d1b3e03961e68.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/react-compiler-runtime-4610bd6d3de9c049.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/scheduler-58b860b049ca307c.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/react-dom-e5fd46a22d5c4058.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/react-dom-client-1b4a3ee065998cea.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/react-is-e0b593954b4706d8.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/react-jsx-runtime-4915cb0f5b3aff04.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/react-reconciler-8e99e505c4429605.js" />

  


  <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/light-5c4e9fc574bf49f3.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/light_high_contrast-fb37c309e0603a69.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dark-afff6c53aef9b9d1.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dark_high_contrast-c409873d7987dffa.css" /><link data-color-theme="light" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light-5c4e9fc574bf49f3.css" /><link data-color-theme="light_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_high_contrast-fb37c309e0603a69.css" /><link data-color-theme="light_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind-0f910d8806d5761b.css" /><link data-color-theme="light_colorblind_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind_high_contrast-a7abd4d4c49ac593.css" /><link data-color-theme="light_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia-5fc4c4a9cb41e596.css" /><link data-color-theme="light_tritanopia_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia_high_contrast-ed0cee9214dedabd.css" /><link data-color-theme="dark" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark-afff6c53aef9b9d1.css" /><link data-color-theme="dark_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_high_contrast-c409873d7987dffa.css" /><link data-color-theme="dark_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind-78a2491d538dab5a.css" /><link data-color-theme="dark_colorblind_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind_high_contrast-c26b63d7c532d0a2.css" /><link data-color-theme="dark_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia-a6f60cea68c08405.css" /><link data-color-theme="dark_tritanopia_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia_high_contrast-f66faf28b2ea18b6.css" /><link data-color-theme="dark_dimmed" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed-6701f6218c53cf5b.css" /><link data-color-theme="dark_dimmed_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed_high_contrast-7037fa46ae124d97.css" />

  <style type="text/css">
    :root {
      --tab-size-preference: 4;
    }

    pre, code {
      tab-size: var(--tab-size-preference);
    }
  </style>

    <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-primitives-97df7784617ce1ea.css" />
    <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-9be9fe6313f476af.css" />
    <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-62747e27e61258dc.css" />
    <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/github-7a418ea859d1654d.css" />
  <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/repository-72bd7d974b5ac1cc.css" />
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-4c5c0895f723f870.css" />

  

  <script type="application/json" id="client-env">{"locale":"en","featureFlags":["actions_caches_react_shell","actions_enable_background_steps","actions_new_hosted_runner_image_select_sizes_and_versions","actions_runners_react_shell","activity_diff_file_tree","activity_repos_file_tree","activity_repos_overview_header","activity_repos_overview_sidebar","agent_author_search_expansion","agent_author_search_expansion_ui_pulls","alternate_user_config_repo","async_conversion_coverage_enabled","billing_billable_licenses_cost_center_bucket_fix","billing_budget_expiration","billing_cost_center_list_assigned_resources","billing_discount_threshold_notification","code_quality_enablement_banner_targeting","code_quality_remove_preview","code_view_raf_sticky_lines","codespaces_prebuild_region_target_update","coding_agent_third_party_model_ui","copilot_agent_snippy","copilot_api_agentic_issue_marshal_yaml","copilot_automation_repo_mcp_servers","copilot_automations_pagination","copilot_base_model_policy_row","copilot_chat_auto_mode_v2","copilot_chat_clear_model_selection_for_default_change","copilot_chat_early_task_provisioning","copilot_chat_persist_session_drafts","copilot_chat_vision_dotcom_chat_ga_gate","copilot_css_textarea_autosize","copilot_custom_copilots","copilot_custom_copilots_feature_preview","copilot_duplicate_thread","copilot_extensions_removal_on_marketplace","copilot_fix_failed_workflows_all_skus","copilot_hide_hovercard","copilot_immersive_task_hyperlinking","copilot_mc_cli_resume_any_users_task","copilot_mission_control_agent_merge_fix_ci","copilot_mission_control_agent_merge_resolve_conflicts","copilot_mission_control_awps_batching","copilot_mission_control_early_stop","copilot_mission_control_managed_sandbox_environments","copilot_mission_control_needs_attention","copilot_mission_control_reasoning_effort","copilot_mission_control_sandbox_remote_bypass","copilot_mission_control_task_alive_updates","copilot_mission_control_task_sharing","copilot_org_policy_page_focus_mode","copilot_share_active_subthread","copilot_spaces_ga","copilot_spaces_individual_policies_ga","copilot_swe_agent_authorization_status_ui","copilot_swe_agent_automation_resource_scoped_writes","copilot_swe_agent_discussion_comment_trigger","copilot_swe_agent_discussion_opened_trigger","copilot_swe_agent_discussion_updated_trigger","copilot_swe_agent_hide_model_picker_if_only_auto","copilot_swe_agent_issue_assigned_trigger","copilot_swe_agent_issue_comment_trigger","copilot_swe_agent_issue_labeled_trigger","copilot_swe_agent_pr_comment_model_picker","copilot_swe_agent_pull_request_assigned_trigger","copilot_swe_agent_pull_request_comment_trigger","copilot_swe_agent_pull_request_labeled_trigger","copilot_swe_agent_pull_request_merged_trigger","copilot_swe_agent_pull_request_opened_trigger","copilot_swe_agent_pull_request_ready_for_review_trigger","copilot_swe_agent_pull_request_review_requested_trigger","copilot_swe_agent_pull_request_review_submitted_trigger","copilot_swe_agent_pull_request_synchronize_trigger","copilot_swe_agent_sub_issue_added_trigger","copilot_swe_agent_use_subagents","copilot_task_api_github_rest_style","copilot_task_scoped_alive_channel","copilot_token_based_billing","copilot_unconfigured_is_inherited","copilot_user_can_upgrade_plan_field","copilot_web_integration_cutover","copilot_workbench_sunset_redirect","dashboard_agents_module_auth_token_check","dashboard_indexeddb_caching","dashboard_lists_max_age_filter","fgpat_permissions_selector_redesign","glc_code_quality_repo_settings_workflow_config","hyperspace_2025_logged_out_batch_1","hyperspace_2025_logged_out_batch_2","hyperspace_2025_logged_out_batch_3","in_product_messaging_datadog_monitoring","ipm_ubb_individual_budget_banner","issue_fields_multi_select","issue_inline_avatars","issue_pinned_views","issue_pinned_views_team_vs_personal","issue_relative_time_micro","issues_expanded_file_types","issues_hide_closed_sub_issues","issues_lazy_load_comment_box_suggestions","issues_react_chrome_container_query_fix","labels_archiving","labels_archiving_info","landing_pages_ninetailed","lifecycle_label_name_updates","marketing_cookie_consent_banner","marketing_pages_search_explore_provider","memex_default_issue_create_repository","memex_live_update_hovercard","memex_mwl_filter_field_delimiter","memex_remove_deprecated_type_issue","merge_queue_restricted_pushers_warning","merge_status_header_feedback","milestone_closed_issues_prioritization","octocaptcha_origin_optimization","primer_react_css_anchor_positioning","primer_react_merged_forwarded_refs","primer_react_timeline_list_semantics","prs_copilot_app_open_action","prs_css_anchor_positioning","pull_request_copilot_attribution_header","pull_request_overview_merge_control","pull_request_overview_panel_edit_description","pull_request_persister","pull_request_stacks_navigation_shortcuts","pull_request_virtualization_image_estimate","pull_request_virtualization_loader_batching","pull_request_virtualization_scroll_compensation","pull_request_virtualization_scroll_intent","quick_search_lazy_suggestions","react_blob_isolate_code_lines","react_blob_ssr_content_visibility","react_data_router_tanstack_allowed","react_logged_out_repository_header","react_query_props_with_key","react_sandbox_future_tanstack","repo_app_turbo","repo_issues_sidebar_layout","repo_pulls_dashboard_declutter","repo_pulls_dashboard_ga","repo_pulls_dashboard_persistence","repo_pulls_dashboard_sidebar_links","repos_contributors_limited_default_range","review_involves_filter","rule_ignored_file_paths","rulesets_actor_list_editor","sample_network_conn_type","security_center_artifact_filters_popover","see_who_reacted","semantic_similarity_duplicate_issue_detection","session_logs_ungroup_reasoning_text","set_sha256_on_repo_creation_form","site_banner_desktop_copilot_app","site_ghca_pixel_mona","site_github_app_ga_page","site_github_app_ga_page_highlight","site_github_app_mobile_native_share","site_global_banner_dev_days_attendee","site_global_nav_spark_models_removed","speculation_rules_ui_service","suggest_custom_property_values_copilot","suppress_automated_browser_vitals","swp_forms_disable_octocaptcha","thread_resolution_reason","update_issue_suggestions","viewscreen_sandbox","warn_inaccessible_attachments","webp_support","workstream_plugin_bootstrap"],"githubDomain":"https://github.com","copilotApiOverrideUrl":"https://api.githubcopilot.com","cmcApiUrl":"https://api.github.com/cmc_internal/api"}</script>
<script crossorigin="anonymous" type="module" src="https://github.githubassets.com/assets/high-contrast-cookie-ecea76118deb7aaa.js"></script>
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/wp-runtime-ae2c923ed3fb42c7.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/app-foundation-e30e053a2ec05810.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/app-runtime-43a736cfb17bfc3b.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/fetch-utilities-63626b86ca960a13.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/ser-a0f837900b980022.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/tp-daaf4baff8a79901.js" />
<script crossorigin="anonymous" type="module" src="https://github.githubassets.com/assets/environment-0ab7314d757363cf.js" defer="defer"></script>
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/app-runtime.7ee70a9cd769c13f.module.css" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/catalyst-42724bfdecdcf111.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/selector-observer-e8810f64c443fb9b.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/relative-time-element-0417f617ad744a0d.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/by-9da36843ba9d191d.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/ja9-9a1160b939f2cd52.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/3h-55903cf2303047ad.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/hk-f1498fec45311acd.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/jz5-7aa1ff0a0e750f41.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/hj-1d800d09e9a8720a.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/j0-ccaf30a6d91f2f83.js" />
<script crossorigin="anonymous" type="module" src="https://github.githubassets.com/assets/github-elements-88cfe118d5489440.js" defer="defer"></script>
<script crossorigin="anonymous" type="module" src="https://github.githubassets.com/assets/element-registry-085c10092566a106.js" defer="defer"></script>
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/runtime-helpers-5e0b3ae3c4036207.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/aria-live-827ce46b7ade1744.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/hotkey-9080b92ee55ecdce.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/react-core-181fffe35f64a86b.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/a9-c3ca0fbca57ec92e.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/urv-054283cae3e84e4a.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/4t-b7957415f663bc13.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/pb-1b8646f441999bcd.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/6n-afcf86ccabc4cad2.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/zj-1e9837c8e3c294ac.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/ix-db979d3ffe7f4c37.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/tw-dd6dc4caea8bef08.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/qyq-3e7962e375ef7004.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/bcs-f35fbf8e2ea6dbe7.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/7l-560ecaad1259d656.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/jl-e8dc4e5499c418bf.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/85-45c9403416d395d4.js" />
<script crossorigin="anonymous" type="module" src="https://github.githubassets.com/assets/behaviors-99a3920e2db317c9.js" defer="defer"></script>
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/react-core.be84e87b659d3b98.module.css" />
<script crossorigin="anonymous" type="module" src="https://github.githubassets.com/assets/code-menu-380374377b31f5ad.js" defer="defer"></script>
  
  <link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/primer-react-b8b1f4173243006b.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/nc-602186f274c7f83c.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/qmp-16b258ea4c9e9207.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/j6-e2974066e87682ac.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/t7l-07b4d1555e9567f3.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/4u-1fa5e65b146a8e59.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/s0-ef17fe8bd07a3b4d.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/y5-1b30b762023d3e89.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/n4u-f85b84521e1734c3.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/j8s-48e0fe20eefd980e.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/la-27679061f16e1495.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/iu-58ac501be176845a.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/gru-90582bf85fdae29b.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/a0-62a325e8a801c241.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/vy-77fa71d04f920b10.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/gb-6acc3941ce05eb8d.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/f7-0866cc20e1a6e4a3.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/csq-a4622df32bd3f47f.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/ssg-cf5ac52afa782913.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/lk-079e9de06c3be0af.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/x00-344c6e66a12fe4b8.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/wsu-447e9f95188c7974.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/038-7e759dd92b23180b.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/qmq-b7fd747ac0dec1dc.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/hwq-eba66f3e802ed05e.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/lcf-c3749f061b720d7a.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/meu-720cfd8779ef970d.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/tg-0262af28cee91950.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/is-72fb9279eae70f4e.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/dc-9a4f5284b4d6b55b.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/w9-183da1d030133670.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/r09-6a8e9e38bd26e4b8.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/642-0c34f01503252c51.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/45z-500ac78bc30b1f49.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/61-99828705784c9574.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/ioz-e202cd57dfb0dbae.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/kwg-1568470998026677.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/1mc-0231984e8f3f4958.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/pc-986abafaf53b769e.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/1e-f3794268c20cd18d.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/uu-6b8bc874d43973a0.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/2sj-a0b3d11863f57a1e.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/oj-79a85dac88e9d3f4.js" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/ys-eeb95a3084a8716b.js" />
<script crossorigin="anonymous" type="module" src="https://github.githubassets.com/assets/code-view-a6e093b12b2a5e7b.js" defer="defer"></script>
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react-css.e4334163c54cccf5.module.css" />
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/45z.922f816fb2d6b268.module.css" />
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/oj.ecb4903dbaae6412.module.css" />
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-view.206bdff86ecd228e.module.css" />


  <title>algorithms/sorting/insertsort/InsertSort.java at main · microwind/algorithms · GitHub</title>



  <meta name="route-pattern" content="/:user_id/:repository/blob/*name(/*path)" data-turbo-transient>
  <meta name="route-controller" content="blob" data-turbo-transient>
  <meta name="route-action" content="show" data-turbo-transient>
  <meta name="fetch-nonce" content="v2:9f39117d-9b00-152a-fa88-de08b05960be">

    
  <meta name="current-catalog-service-hash" content="f3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb">


  <meta name="request-id" content="EA24:1FF55D:401C0A:59824F:6AC85E44" data-pjax-transient="true"/><meta name="html-safe-nonce" content="533d0a2f0446fb65e8370e8a37a65d949b6c5d2d0c8ea44dbad73154cb5b46af" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTI0OjFGRjU1RDo0MDFDMEE6NTk4MjRGOjZBQzg1RTQ0IiwidmlzaXRvcl9pZCI6Ijg1ODkxODQxMDQwOTExMTUwNzYiLCJyZWdpb25fZWRnZSI6ImZyYSIsInJlZ2lvbl9yZW5kZXIiOiJmcmEifQ==" data-pjax-transient="true"/><meta name="visitor-hmac" content="050b785302d66cd103bcda55575510303bb74c9322ca483dc6b2393b1ebec4db" data-pjax-transient="true"/>


    <meta name="hovercard-subject-tag" content="repository:276782021" data-turbo-transient>


  <meta name="github-keyboard-shortcuts" content="repository,source-code,file-tree,copilot" data-turbo-transient="true" />
  

  <meta name="selected-link" value="repo_source" data-turbo-transient>
  <link rel="assets" href="https://github.githubassets.com/">

    <meta name="google-site-verification" content="Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I">

<meta name="octolytics-url" content="https://collector.github.com/github/collect" />





  <meta name="analytics-location" content="/&lt;user-name&gt;/&lt;repo-name&gt;/blob/show" data-turbo-transient="true" />

  




    <meta name="user-login" content="">

  

    <meta name="viewport" content="width=device-width">

    

      <meta name="description" content="🚀AI时代，人人都是算法思想工程师。本项目含各种数据结构与经典算法，充分举例说明，用C/Java/Python/JS/Go/Rust等不同语言实现，一边学算法一边学语言。助您打牢基础，彻底理解编程的本质，以便驾驭和用好AI。 - algorithms/sorting/insertsort/InsertSort.java at main · microwind/algorithms">

      <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">

    <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
    <meta property="fb:app_id" content="1401488693436528">
    <meta name="apple-itunes-app" content="app-id=1477376905, app-argument=https://github.com/microwind/algorithms/blob/main/sorting/insertsort/InsertSort.java" />

      <meta name="twitter:image" content="https://repository-images.githubusercontent.com/276782021/7cead280-bd32-11ea-88c8-660a866a11b2" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="algorithms/sorting/insertsort/InsertSort.java at main · microwind/algorithms" /><meta name="twitter:description" content="🚀AI时代，人人都是算法思想工程师。本项目含各种数据结构与经典算法，充分举例说明，用C/Java/Python/JS/Go/Rust等不同语言实现，一边学算法一边学语言。助您打牢基础，彻底理解编程的本质，以便驾驭和用好AI。 - microwind/algorithms" />
  <meta property="og:image" content="https://repository-images.githubusercontent.com/276782021/7cead280-bd32-11ea-88c8-660a866a11b2" /><meta property="og:image:alt" content="🚀AI时代，人人都是算法思想工程师。本项目含各种数据结构与经典算法，充分举例说明，用C/Java/Python/JS/Go/Rust等不同语言实现，一边学算法一边学语言。助您打牢基础，彻底理解编程的本质，以便驾驭和用好AI。 - microwind/algorithms" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="algorithms/sorting/insertsort/InsertSort.java at main · microwind/algorithms" /><meta property="og:url" content="https://github.com/microwind/algorithms/blob/main/sorting/insertsort/InsertSort.java" /><meta property="og:description" content="🚀AI时代，人人都是算法思想工程师。本项目含各种数据结构与经典算法，充分举例说明，用C/Java/Python/JS/Go/Rust等不同语言实现，一边学算法一边学语言。助您打牢基础，彻底理解编程的本质，以便驾驭和用好AI。 - microwind/algorithms" />
  




      <meta name="hostname" content="github.com">



        <meta name="expected-hostname" content="github.com">


  <meta http-equiv="x-pjax-version" content="a32d59659161670c11d8e96bef14462ce3a919034c4f0e460dd991bb77cc7a8e" data-turbo-track="reload">
  <meta http-equiv="x-pjax-csp-version" content="c4a65e47b0c850e1157ae8e66298070851d7e3b558038de5a3b4ff7a93e630ed" data-turbo-track="reload">
  <meta http-equiv="x-pjax-css-version" content="1ff3f1d4e1abd61f6f135b47d3b815e2f7169f8dd418f0118c6b1cf4de6cbc86" data-turbo-track="reload">
  <meta http-equiv="x-pjax-js-version" content="62c694dbfccd36668466b597ca6355de7647b48d3ef1ba1c805e3ac89f6c2c64" data-turbo-track="reload">

  <meta name="turbo-cache-control" content="no-preview" data-turbo-transient="">

      <meta name="turbo-cache-control" content="no-cache" data-turbo-transient>

    <meta data-hydrostats="publish">

  <meta name="go-import" content="github.com/microwind/algorithms git https://github.com/microwind/algorithms.git">

  <meta name="octolytics-dimension-user_id" content="67299763" /><meta name="octolytics-dimension-user_login" content="microwind" /><meta name="octolytics-dimension-repository_id" content="276782021" /><meta name="octolytics-dimension-repository_nwo" content="microwind/algorithms" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="276782021" /><meta name="octolytics-dimension-repository_network_root_nwo" content="microwind/algorithms" />
  



    

    <meta name="turbo-body-classes" content="logged-out env-production page-responsive">
  <meta name="disable-turbo" content="false">


  <meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">


  <meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">

  <meta name="release" content="8d63c7709da41fbaec6a3a2c34ee9f1785dc2937" data-turbo-track="reload">
  <meta name="ui-target" content="full">

  <link rel="mask-icon" href="https://github.githubassets.com/assets/pinned-octocat-093da3e6fa40.svg" color="#000000">
  <link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon.png">
  <link rel="icon" class="js-site-favicon" type="image/svg+xml" href="https://github.githubassets.com/favicons/favicon.svg" data-base-href="https://github.githubassets.com/favicons/favicon">

<meta name="theme-color" content="#1e2327">
<meta name="color-scheme" content="light dark" />


  <link rel="manifest" href="/manifest.json" crossOrigin="use-credentials">

  </head>

  <body class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
    <div data-turbo-body class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
      <div id="__primerPortalRoot__" style="z-index: 1000; position: absolute; width: 100%;" data-turbo-permanent></div>
      

    <div class="position-relative header-wrapper js-header-wrapper ">
      <a href="#start-of-content" data-skip-target-assigned="false" class="px-2 tmp-py-4 color-bg-accent-emphasis color-fg-on-emphasis show-on-focus js-skip-to-content">Skip to content</a>

      <span data-view-component="true" class="progress-pjax-loader Progress position-fixed width-full">
    <span style="width: 0%;" data-view-component="true" class="Progress-item progress-pjax-loader-bar left-0 top-0 color-bg-accent-emphasis"></span>
</span>      
      <link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/no-1cf75929f17e3028.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/keyboard-shortcuts-dialog-a7b1e720c8d8dc36.js" fetchpriority="low" />
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react-css.e4334163c54cccf5.module.css" />
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/keyboard-shortcuts-dialog.ac351e8516148495.module.css" />

<react-partial
  partial-name="keyboard-shortcuts-dialog"
  data-ssr="false"
  data-attempted-ssr="false"
  data-react-profiling="false"
>
  
  <script type="application/json" data-target="react-partial.embeddedData">{"props":{"docsUrl":"https://docs.github.com/get-started/accessibility/keyboard-shortcuts"}}</script>
  <div data-target="react-partial.reactRoot"></div>
</react-partial>





      

          <link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/app-install-banner-partial-90fc15644d34d442.js" fetchpriority="low" />
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react-css.e4334163c54cccf5.module.css" />
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/app-install-banner-partial.4ea51448c4f973db.module.css" />

<react-partial
  partial-name="app-install-banner-partial"
  data-ssr="false"
  data-attempted-ssr="false"
  data-react-profiling="false"
>
  
  <script type="application/json" data-target="react-partial.embeddedData">{"props":{}}</script>
  <div data-target="react-partial.reactRoot"></div>
</react-partial>


          

                <link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/2lp-a40e70e520dbe650.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/rwd-7b2c7e3d5830b9e9.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/fz5-26e9f173be523540.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/jag-e8b94ef4bf214893.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/l19-ab9291460ccba23f.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/5nx-54af91826ad57196.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/zn-f168d65b85b3e44a.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/marketing-header-0c7e99a55d76a9f8.js" fetchpriority="low" />
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react-css.e4334163c54cccf5.module.css" />
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react-brand-css.05b219cdb8e80c43.module.css" />
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/zn.9fc2e923e926de87.module.css" />

<react-partial
  partial-name="marketing-header"
  data-ssr="true"
  data-attempted-ssr="true"
  data-react-profiling="false"
>
  
  <script type="application/json" data-target="react-partial.embeddedData">{"props":{"color_mode":"dark","logged_in":false,"marketing_page":false,"home_path":"/","login_path":"/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrowind%2Falgorithms%2Fblob%2Fmain%2Fsorting%2Finsertsort%2FInsertSort.java","signup_path":"/signup?ref_cta=Sign+up\u0026ref_loc=header+logged+out\u0026ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fblob%2Fshow\u0026source=header-repo\u0026source_repo=microwind%2Falgorithms","signup_enabled":true,"is_signup_controller":false,"show_search_and_nav":true,"hide_search":false,"private_mode_enabled":false,"should_use_dotcom_links":true,"auth_hydro_click":"{\"event_type\":\"authentication.click\",\"payload\":{\"location_in_page\":\"site header menu\",\"repository_id\":null,\"auth_type\":\"SIGN_UP\",\"originating_url\":\"https://github.com/microwind/algorithms/blob/main/sorting/insertsort/InsertSort.java\",\"user_id\":null}}","auth_hydro_click_hmac":"89bf7c689653e0052e8e4443ef48d30dd7a96187ea47222bf415b6eb14cb975c","overlay":false,"fixed":false}}</script>
  <div data-target="react-partial.reactRoot"><div data-color-mode="dark" data-light-theme="light" data-dark-theme="dark"><header class="MarketingHeader-module__root__Tk7n3 HeaderMktg header-logged-out" role="banner" data-marketing-header="true" data-color-mode="dark" data-light-theme="light" data-dark-theme="dark" data-is-top="true"><h2 class="MarketingHeader-module__visuallyHidden__sqKsl">Navigation Menu</h2><button type="button" class="MarketingHeader-module__backdrop__sw4RU" aria-label="Close navigation menu"></button><div class="MarketingHeader-module__bar__mBSyE"><div class="MarketingHeader-module__topRow__yeury"><div class="MarketingHeader-module__toggleSlot__hDxbh"><button type="button" class="HeaderMenuToggle-module__toggle__i8EiC" aria-label="Toggle navigation" aria-expanded="false"><span class="HeaderMenuToggle-module__toggleBar__jVN0H"></span><span class="HeaderMenuToggle-module__toggleBar__jVN0H"></span><span class="HeaderMenuToggle-module__toggleBar__jVN0H"></span></button></div><a href="/" aria-label="Homepage" class="HeaderLogo-module__logo__UFyHI" data-analytics-event="{&quot;action&quot;:&quot;homepage&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;logo&quot;,&quot;location&quot;:&quot;header&quot;,&quot;label&quot;:&quot;homepage_link_logo_header&quot;}"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-mark-github" viewBox="0 0 24 24" width="32" height="32" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M10.226 17.284c-2.965-.36-5.054-2.493-5.054-5.256 0-1.123.404-2.336 1.078-3.144-.292-.741-.247-2.314.09-2.965.898-.112 2.111.36 2.83 1.01.853-.269 1.752-.404 2.853-.404 1.1 0 1.999.135 2.807.382.696-.629 1.932-1.1 2.83-.988.315.606.36 2.179.067 2.942.72.854 1.101 2 1.101 3.167 0 2.763-2.089 4.852-5.098 5.234.763.494 1.28 1.572 1.28 2.807v2.336c0 .674.561 1.056 1.235.786 4.066-1.55 7.255-5.615 7.255-10.646C23.5 6.188 18.334 1 11.978 1 5.62 1 .5 6.188.5 12.545c0 4.986 3.167 9.12 7.435 10.669.606.225 1.19-.18 1.19-.786V20.63a2.9 2.9 0 0 1-1.078.224c-1.483 0-2.359-.808-2.987-2.313-.247-.607-.517-.966-1.034-1.033-.27-.023-.359-.135-.359-.27 0-.27.45-.471.898-.471.652 0 1.213.404 1.797 1.235.45.651.921.943 1.483.943.561 0 .92-.202 1.437-.719.382-.381.674-.718.944-.943"></path></svg></a><div class="AuthCTAs-module__mobileActions__NNzeV"><a class="Primer_Brand__Button-module__Button___scH9Z Primer_Brand__Button-module__Button--subtle___F7pEE Primer_Brand__Button-module__Button--size-small___zQrEw AuthCTAs-module__cta__WpwQq" href="/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrowind%2Falgorithms%2Fblob%2Fmain%2Fsorting%2Finsertsort%2FInsertSort.java" data-analytics-event="{&quot;action&quot;:&quot;sign_in&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;auth_cta&quot;,&quot;location&quot;:&quot;header&quot;,&quot;label&quot;:&quot;sign_in_link_auth_cta_header&quot;}" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;site header menu&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;SIGN_UP&quot;,&quot;originating_url&quot;:&quot;https://github.com/microwind/algorithms/blob/main/sorting/insertsort/InsertSort.java&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="89bf7c689653e0052e8e4443ef48d30dd7a96187ea47222bf415b6eb14cb975c"><span class="Primer_Brand__Button-module__Button__text___ED0bX"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ Primer_Brand__Button-module__Button--label___qrkyz Primer_Brand__Button-module__Button--label-subtle___8ndWH">Sign in</span></span></a><button class="Primer_Brand__Button-module__Button___scH9Z Primer_Brand__Button-module__Button--subtle___F7pEE Primer_Brand__Button-module__Button--size-small___zQrEw HeaderAppearanceSettings-module__trigger__hUheK" type="button" aria-haspopup="dialog" aria-labelledby="_R_3dd_"><span class="Primer_Brand__Button-module__Button__leading-visual___jjtTe" data-testid="Button-leading-visual"><svg data-component="Octicon" focusable="false" aria-hidden="true" class="octicon octicon-sliders Primer_Brand__Button-module__Button__icon-visual____qybb" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M15 2.75a.75.75 0 0 1-.75.75h-4a.75.75 0 0 1 0-1.5h4a.75.75 0 0 1 .75.75Zm-8.5.75v1.25a.75.75 0 0 0 1.5 0v-4a.75.75 0 0 0-1.5 0V2H1.75a.75.75 0 0 0 0 1.5H6.5Zm1.25 5.25a.75.75 0 0 0 0-1.5h-6a.75.75 0 0 0 0 1.5h6ZM15 8a.75.75 0 0 1-.75.75H11.5V10a.75.75 0 1 1-1.5 0V6a.75.75 0 0 1 1.5 0v1.25h2.75A.75.75 0 0 1 15 8Zm-9 5.25v-2a.75.75 0 0 0-1.5 0v1.25H1.75a.75.75 0 0 0 0 1.5H4.5v1.25a.75.75 0 0 0 1.5 0v-2Zm9 0a.75.75 0 0 1-.75.75h-6a.75.75 0 0 1 0-1.5h6a.75.75 0 0 1 .75.75Z"></path></svg></span><span class="Primer_Brand__Button-module__Button__text___ED0bX"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ Primer_Brand__Button-module__Button--label___qrkyz Primer_Brand__Button-module__Button--label-subtle___8ndWH"></span></span></button><div class="Primer_Brand__Tooltip-module__Tooltip___0Eipx" data-direction="s" aria-hidden="true" id="_R_3dd_">Appearance settings</div></div></div><div class="MarketingHeader-module__menu__GIy3y"><div class="MarketingHeader-module__menuWrapper__owstH"><nav class="MarketingNavigation-module__nav__W0KYY" aria-label="Global"><ul class="MarketingNavigation-module__list__tFbMb"><li><div class="NavDropdown-module__container__l2YeI"><button type="button" class="NavDropdown-module__button__PEHWX" aria-expanded="false" aria-controls="_R_nd_">Platform<svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-triangle-right NavDropdown-module__buttonIcon__Tkl8_" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m6.427 4.427 3.396 3.396a.25.25 0 0 1 0 .354l-3.396 3.396A.25.25 0 0 1 6 11.396V4.604a.25.25 0 0 1 .427-.177Z"></path></svg></button><div id="_R_nd_" class="NavDropdown-module__dropdown__xm1jd"><ul class="NavDropdown-module__list__zuCgG"><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_5knd_">AI CODE CREATION</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_5knd_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/features/copilot" data-analytics-event="{&quot;action&quot;:&quot;github_copilot&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;platform&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;github_copilot_link_platform_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-copilot NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M7.998 15.035c-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.201-.508-.254-1.084-.254-1.656 0-.87.128-1.769.693-2.484.579-.733 1.494-1.124 2.724-1.261 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095v1.872c0 .766-3.351 3.795-8.002 3.795Zm0-1.485c2.28 0 4.584-1.11 5.002-1.433V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-1.146 0-2.059-.327-2.71-.991A3.222 3.222 0 0 1 8 6.303a3.24 3.24 0 0 1-.544.743c-.65.664-1.563.991-2.71.991-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433ZM6.762 2.83c-.193-.206-.637-.413-1.682-.297-1.019.113-1.479.404-1.713.7-.247.312-.369.789-.369 1.554 0 .793.129 1.171.308 1.371.162.181.519.379 1.442.379.853 0 1.339-.235 1.638-.54.315-.322.527-.827.617-1.553.117-.935-.037-1.395-.241-1.614Zm4.155-.297c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Z"></path><path d="M6.25 9.037a.75.75 0 0 1 .75.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 .75-.75Zm4.25.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 1.5 0Z"></path></svg>GitHub Copilot</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Write better code with AI</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/features/ai/github-app" data-analytics-event="{&quot;action&quot;:&quot;github_copilot_app&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;platform&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;github_copilot_app_link_platform_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-mark-github NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M6.766 11.328c-2.063-.25-3.516-1.734-3.516-3.656 0-.781.281-1.625.75-2.188-.203-.515-.172-1.609.063-2.062.625-.078 1.468.25 1.968.703.594-.187 1.219-.281 1.985-.281.765 0 1.39.094 1.953.265.484-.437 1.344-.765 1.969-.687.218.422.25 1.515.046 2.047.5.593.766 1.39.766 2.203 0 1.922-1.453 3.375-3.547 3.64.531.344.89 1.094.89 1.954v1.625c0 .468.391.734.86.547C13.781 14.359 16 11.53 16 8.03 16 3.61 12.406 0 7.984 0 3.563 0 0 3.61 0 8.031a7.88 7.88 0 0 0 5.172 7.422c.422.156.828-.125.828-.547v-1.25c-.219.094-.5.156-.75.156-1.031 0-1.64-.562-2.078-1.609-.172-.422-.36-.672-.719-.719-.187-.015-.25-.093-.25-.187 0-.188.313-.328.625-.328.453 0 .844.281 1.25.86.313.452.64.655 1.031.655s.641-.14 1-.5c.266-.265.47-.5.657-.656"></path></svg>GitHub Copilot app</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Direct agents from issue to merge</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/mcp" data-analytics-event="{&quot;action&quot;:&quot;mcp_registry&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;platform&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;mcp_registry_link_platform_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-mcp NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M5.52 1.12a3.578 3.578 0 0 1 6.078 2.98 3.578 3.578 0 0 1 2.982 6.08l-3.292 3.293a.252.252 0 0 0 0 .354l.843.843a.749.749 0 1 1-1.06 1.06l-.844-.843a1.75 1.75 0 0 1 0-2.474L13.52 9.12a2.08 2.08 0 0 0 0-2.94 2.08 2.08 0 0 0-2.94 0L7.731 9.03A.75.75 0 0 1 6.67 7.97l2.85-2.85a2.08 2.08 0 0 0 0-2.94 2.08 2.08 0 0 0-2.94 0l-4.799 4.8A.75.75 0 0 1 .72 5.92Z"></path><path d="M7.52 3.12a.749.749 0 1 1 1.06 1.06L5.731 7.03A2.079 2.079 0 0 0 8.67 9.97l2.85-2.85a.749.749 0 1 1 1.06 1.06l-2.849 2.85A3.578 3.578 0 0 1 4.67 5.97Z"></path></svg>MCP Registry</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Integrate external tools</span></span></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_9knd_">DEVELOPER WORKFLOWS</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_9knd_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/features/actions" data-analytics-event="{&quot;action&quot;:&quot;actions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;platform&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;actions_link_platform_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-workflow NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M0 1.75C0 .784.784 0 1.75 0h3.5C6.216 0 7 .784 7 1.75v3.5A1.75 1.75 0 0 1 5.25 7H4v4a1 1 0 0 0 1 1h4v-1.25C9 9.784 9.784 9 10.75 9h3.5c.966 0 1.75.784 1.75 1.75v3.5A1.75 1.75 0 0 1 14.25 16h-3.5A1.75 1.75 0 0 1 9 14.25v-.75H5A2.5 2.5 0 0 1 2.5 11V7h-.75A1.75 1.75 0 0 1 0 5.25Zm1.75-.25a.25.25 0 0 0-.25.25v3.5c0 .138.112.25.25.25h3.5a.25.25 0 0 0 .25-.25v-3.5a.25.25 0 0 0-.25-.25Zm9 9a.25.25 0 0 0-.25.25v3.5c0 .138.112.25.25.25h3.5a.25.25 0 0 0 .25-.25v-3.5a.25.25 0 0 0-.25-.25Z"></path></svg>Actions</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Automate any workflow</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/features/codespaces" data-analytics-event="{&quot;action&quot;:&quot;codespaces&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;platform&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;codespaces_link_platform_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-codespaces NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M0 11.25c0-.966.784-1.75 1.75-1.75h12.5c.966 0 1.75.784 1.75 1.75v3A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25Zm2-9.5C2 .784 2.784 0 3.75 0h8.5C13.216 0 14 .784 14 1.75v5a1.75 1.75 0 0 1-1.75 1.75h-8.5A1.75 1.75 0 0 1 2 6.75Zm1.75-.25a.25.25 0 0 0-.25.25v5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-5a.25.25 0 0 0-.25-.25Zm-2 9.5a.25.25 0 0 0-.25.25v3c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-3a.25.25 0 0 0-.25-.25Z"></path><path d="M7 12.75a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Zm-4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75Z"></path></svg>Codespaces</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Instant dev environments</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/features/issues" data-analytics-event="{&quot;action&quot;:&quot;issues&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;platform&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;issues_link_platform_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-issue-opened NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path></svg>Issues</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Plan and track work</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/features/code-review" data-analytics-event="{&quot;action&quot;:&quot;code_review&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;platform&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;code_review_link_platform_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-code NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path></svg>Code Review</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Manage code changes</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/features/code-quality" data-analytics-event="{&quot;action&quot;:&quot;code_quality&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;platform&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;code_quality_link_platform_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-codescan-checkmark NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M10.28 6.28a.75.75 0 1 0-1.06-1.06L6.25 8.19l-.97-.97a.75.75 0 0 0-1.06 1.06l1.5 1.5a.75.75 0 0 0 1.06 0l3.5-3.5Z"></path><path d="M7.5 15a7.5 7.5 0 1 1 5.807-2.754l2.473 2.474a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215l-2.474-2.473A7.472 7.472 0 0 1 7.5 15Zm0-13.5a6 6 0 1 0 4.094 10.386.748.748 0 0 1 .293-.292 6.002 6.002 0 0 0 1.117-6.486A6.002 6.002 0 0 0 7.5 1.5Z"></path></svg>Code Quality</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Enforce quality at merge</span></span></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_dknd_">APPLICATION SECURITY</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_dknd_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/security/advanced-security" data-analytics-event="{&quot;action&quot;:&quot;github_advanced_security&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;platform&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;github_advanced_security_link_platform_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-shield-check NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m8.533.133 5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667l5.25-1.68a1.748 1.748 0 0 1 1.066 0Zm-.61 1.429.001.001-5.25 1.68a.251.251 0 0 0-.174.237V7c0 1.36.275 2.666 1.057 3.859.784 1.194 2.121 2.342 4.366 3.298a.196.196 0 0 0 .154 0c2.245-.957 3.582-2.103 4.366-3.297C13.225 9.666 13.5 8.358 13.5 7V3.48a.25.25 0 0 0-.174-.238l-5.25-1.68a.25.25 0 0 0-.153 0ZM11.28 6.28l-3.5 3.5a.75.75 0 0 1-1.06 0l-1.5-1.5a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l.97.97 2.97-2.97a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg>GitHub Advanced Security</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Find and fix vulnerabilities</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/security/advanced-security/code-security" data-analytics-event="{&quot;action&quot;:&quot;code_security&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;platform&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;code_security_link_platform_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-code-square NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25Zm7.47 3.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L10.69 8 9.22 6.53a.75.75 0 0 1 0-1.06ZM6.78 6.53 5.31 8l1.47 1.47a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg>Code security</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Secure your code as you build</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/security/advanced-security/secret-protection" data-analytics-event="{&quot;action&quot;:&quot;secret_protection&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;platform&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;secret_protection_link_platform_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-lock NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M4 4a4 4 0 0 1 8 0v2h.25c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 12.25 15h-8.5A1.75 1.75 0 0 1 2 13.25v-5.5C2 6.784 2.784 6 3.75 6H4Zm8.25 3.5h-8.5a.25.25 0 0 0-.25.25v5.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25ZM10.5 6V4a2.5 2.5 0 1 0-5 0v2Z"></path></svg>Secret protection</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Stop leaks before they start</span></span></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ NavGroup-module__hasSeparator__FnMrN"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_hknd_">EXPLORE</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_hknd_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/why-github" data-analytics-event="{&quot;action&quot;:&quot;why_github&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;platform&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;why_github_link_platform_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Why GitHub</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://docs.github.com" data-analytics-event="{&quot;action&quot;:&quot;documentation&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;platform&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;documentation_link_platform_navbar&quot;}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Documentation</span><svg data-component="Octicon" focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://github.blog" data-analytics-event="{&quot;action&quot;:&quot;blog&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;platform&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;blog_link_platform_navbar&quot;}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Blog</span><svg data-component="Octicon" focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://github.blog/changelog" data-analytics-event="{&quot;action&quot;:&quot;changelog&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;platform&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;changelog_link_platform_navbar&quot;}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Changelog</span><svg data-component="Octicon" focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/marketplace" data-analytics-event="{&quot;action&quot;:&quot;marketplace&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;platform&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;marketplace_link_platform_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Marketplace</span></a></li></ul></div></li></ul><div class="NavDropdown-module__trailingLinkContainer__VgJGL"><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--arrow-end___esdN8" href="https://github.com/features" data-analytics-event="{&quot;action&quot;:&quot;view_all_features&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;platform&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;view_all_features_link_platform_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">View all features</span><svg class="Primer_Brand__ExpandableArrow-module__ExpandableArrow___aaZs9 Primer_Brand__Link-module__Link-arrow___yd78i" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" focusable="false"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="Primer_Brand__ExpandableArrow-module__ExpandableArrow-stem___0K8Hz" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg></a></div></div></div></li><li><div class="NavDropdown-module__container__l2YeI"><button type="button" class="NavDropdown-module__button__PEHWX" aria-expanded="false" aria-controls="_R_17d_">Solutions<svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-triangle-right NavDropdown-module__buttonIcon__Tkl8_" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m6.427 4.427 3.396 3.396a.25.25 0 0 1 0 .354l-3.396 3.396A.25.25 0 0 1 6 11.396V4.604a.25.25 0 0 1 .427-.177Z"></path></svg></button><div id="_R_17d_" class="NavDropdown-module__dropdown__xm1jd"><ul class="NavDropdown-module__list__zuCgG"><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_5l7d_">BY COMPANY SIZE</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_5l7d_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/enterprise" data-analytics-event="{&quot;action&quot;:&quot;enterprises&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;enterprises_link_solutions_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Enterprises</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/team" data-analytics-event="{&quot;action&quot;:&quot;small_and_medium_teams&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;small_and_medium_teams_link_solutions_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Small and medium teams</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/enterprise/startups" data-analytics-event="{&quot;action&quot;:&quot;startups&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;startups_link_solutions_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Startups</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/industry/nonprofits" data-analytics-event="{&quot;action&quot;:&quot;nonprofits&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;nonprofits_link_solutions_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Nonprofits</span></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_9l7d_">BY USE CASE</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_9l7d_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/use-case/app-modernization" data-analytics-event="{&quot;action&quot;:&quot;app_modernization&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;app_modernization_link_solutions_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">App Modernization</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/use-case/devsecops" data-analytics-event="{&quot;action&quot;:&quot;devsecops&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;devsecops_link_solutions_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">DevSecOps</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/use-case/devops" data-analytics-event="{&quot;action&quot;:&quot;devops&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;devops_link_solutions_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">DevOps</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/use-case/ci-cd" data-analytics-event="{&quot;action&quot;:&quot;ci/cd&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;ci/cd_link_solutions_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">CI/CD</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--arrow-end___esdN8" href="https://github.com/solutions/use-case" data-analytics-event="{&quot;action&quot;:&quot;view_all_use_cases&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;view_all_use_cases_link_solutions_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">View all use cases</span><svg class="Primer_Brand__ExpandableArrow-module__ExpandableArrow___aaZs9 Primer_Brand__Link-module__Link-arrow___yd78i" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" focusable="false"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="Primer_Brand__ExpandableArrow-module__ExpandableArrow-stem___0K8Hz" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_dl7d_">BY INDUSTRY</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_dl7d_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/industry/healthcare" data-analytics-event="{&quot;action&quot;:&quot;healthcare&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;healthcare_link_solutions_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Healthcare</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/industry/financial-services" data-analytics-event="{&quot;action&quot;:&quot;financial_services&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;financial_services_link_solutions_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Financial services</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/industry/manufacturing" data-analytics-event="{&quot;action&quot;:&quot;manufacturing&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;manufacturing_link_solutions_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Manufacturing</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/industry/government" data-analytics-event="{&quot;action&quot;:&quot;government&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;government_link_solutions_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Government</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--arrow-end___esdN8" href="https://github.com/solutions/industry" data-analytics-event="{&quot;action&quot;:&quot;view_all_industries&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;view_all_industries_link_solutions_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">View all industries</span><svg class="Primer_Brand__ExpandableArrow-module__ExpandableArrow___aaZs9 Primer_Brand__Link-module__Link-arrow___yd78i" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" focusable="false"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="Primer_Brand__ExpandableArrow-module__ExpandableArrow-stem___0K8Hz" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg></a></li></ul></div></li></ul><div class="NavDropdown-module__trailingLinkContainer__VgJGL"><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--arrow-end___esdN8" href="https://github.com/solutions" data-analytics-event="{&quot;action&quot;:&quot;view_all_solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;view_all_solutions_link_solutions_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">View all solutions</span><svg class="Primer_Brand__ExpandableArrow-module__ExpandableArrow___aaZs9 Primer_Brand__Link-module__Link-arrow___yd78i" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" focusable="false"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="Primer_Brand__ExpandableArrow-module__ExpandableArrow-stem___0K8Hz" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg></a></div></div></div></li><li><div class="NavDropdown-module__container__l2YeI"><button type="button" class="NavDropdown-module__button__PEHWX" aria-expanded="false" aria-controls="_R_1nd_">Resources<svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-triangle-right NavDropdown-module__buttonIcon__Tkl8_" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m6.427 4.427 3.396 3.396a.25.25 0 0 1 0 .354l-3.396 3.396A.25.25 0 0 1 6 11.396V4.604a.25.25 0 0 1 .427-.177Z"></path></svg></button><div id="_R_1nd_" class="NavDropdown-module__dropdown__xm1jd"><ul class="NavDropdown-module__list__zuCgG"><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_5lnd_">EXPLORE BY TOPIC</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_5lnd_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/resources/articles?topic=ai" data-analytics-event="{&quot;action&quot;:&quot;ai&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;ai_link_resources_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">AI</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/resources/articles?topic=software-development" data-analytics-event="{&quot;action&quot;:&quot;software_development&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;software_development_link_resources_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Software Development</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/resources/articles?topic=devops" data-analytics-event="{&quot;action&quot;:&quot;devops&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;devops_link_resources_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">DevOps</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/resources/articles?topic=security" data-analytics-event="{&quot;action&quot;:&quot;security&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;security_link_resources_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Security</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--arrow-end___esdN8" href="https://github.com/resources/articles" data-analytics-event="{&quot;action&quot;:&quot;view_all_topics&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;view_all_topics_link_resources_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">View all topics</span><svg class="Primer_Brand__ExpandableArrow-module__ExpandableArrow___aaZs9 Primer_Brand__Link-module__Link-arrow___yd78i" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" focusable="false"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="Primer_Brand__ExpandableArrow-module__ExpandableArrow-stem___0K8Hz" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_9lnd_">EXPLORE BY TYPE</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_9lnd_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/customer-stories" data-analytics-event="{&quot;action&quot;:&quot;customer_stories&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;customer_stories_link_resources_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Customer stories</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/resources/events" data-analytics-event="{&quot;action&quot;:&quot;events__webinars&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;events__webinars_link_resources_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Events &amp; webinars</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/resources/whitepapers" data-analytics-event="{&quot;action&quot;:&quot;ebooks__reports&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;ebooks__reports_link_resources_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Ebooks &amp; reports</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/solutions/executive-insights" data-analytics-event="{&quot;action&quot;:&quot;business_insights&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;business_insights_link_resources_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Business insights</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://skills.github.com" data-analytics-event="{&quot;action&quot;:&quot;github_skills&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;github_skills_link_resources_navbar&quot;}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">GitHub Skills</span><svg data-component="Octicon" focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_dlnd_">SUPPORT &amp; SERVICES</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_dlnd_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://docs.github.com" data-analytics-event="{&quot;action&quot;:&quot;documentation&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;documentation_link_resources_navbar&quot;}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Documentation</span><svg data-component="Octicon" focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://support.github.com" data-analytics-event="{&quot;action&quot;:&quot;customer_support&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;customer_support_link_resources_navbar&quot;}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Customer support</span><svg data-component="Octicon" focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/orgs/community/discussions" data-analytics-event="{&quot;action&quot;:&quot;community_forum&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;community_forum_link_resources_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Community forum</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/trust-center" data-analytics-event="{&quot;action&quot;:&quot;trust_center&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;trust_center_link_resources_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Trust center</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/partners" data-analytics-event="{&quot;action&quot;:&quot;partners&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;partners_link_resources_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Partners</span></a></li></ul></div></li></ul><div class="NavDropdown-module__trailingLinkContainer__VgJGL"><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--arrow-end___esdN8" href="https://github.com/resources" data-analytics-event="{&quot;action&quot;:&quot;view_all_resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;view_all_resources_link_resources_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">View all resources</span><svg class="Primer_Brand__ExpandableArrow-module__ExpandableArrow___aaZs9 Primer_Brand__Link-module__Link-arrow___yd78i" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" focusable="false"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="Primer_Brand__ExpandableArrow-module__ExpandableArrow-stem___0K8Hz" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg></a></div></div></div></li><li><div class="NavDropdown-module__container__l2YeI"><button type="button" class="NavDropdown-module__button__PEHWX" aria-expanded="false" aria-controls="_R_27d_">Open Source<svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-triangle-right NavDropdown-module__buttonIcon__Tkl8_" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m6.427 4.427 3.396 3.396a.25.25 0 0 1 0 .354l-3.396 3.396A.25.25 0 0 1 6 11.396V4.604a.25.25 0 0 1 .427-.177Z"></path></svg></button><div id="_R_27d_" class="NavDropdown-module__dropdown__xm1jd"><ul class="NavDropdown-module__list__zuCgG"><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_5m7d_">COMMUNITY</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_5m7d_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/open-source/sponsors" data-analytics-event="{&quot;action&quot;:&quot;github_sponsors&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;github_sponsors_link_open_source_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-sponsor-tiers NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M10.586 1C12.268 1 13.5 2.37 13.5 4.25c0 1.745-.996 3.359-2.622 4.831-.166.15-.336.297-.509.438l1.116 5.584a.75.75 0 0 1-.991.852l-2.409-.876a.25.25 0 0 0-.17 0l-2.409.876a.75.75 0 0 1-.991-.852L5.63 9.519a13.78 13.78 0 0 1-.51-.438C3.497 7.609 2.5 5.995 2.5 4.25 2.5 2.37 3.732 1 5.414 1c.963 0 1.843.403 2.474 1.073L8 2.198l.112-.125a3.385 3.385 0 0 1 2.283-1.068L10.586 1Zm-3.621 9.495-.718 3.594 1.155-.42a1.75 1.75 0 0 1 1.028-.051l.168.051 1.154.42-.718-3.592c-.199.13-.37.235-.505.314l-.169.097a.75.75 0 0 1-.72 0 9.54 9.54 0 0 1-.515-.308l-.16-.105ZM10.586 2.5c-.863 0-1.611.58-1.866 1.459-.209.721-1.231.721-1.44 0C7.025 3.08 6.277 2.5 5.414 2.5 4.598 2.5 4 3.165 4 4.25c0 1.23.786 2.504 2.128 3.719.49.443 1.018.846 1.546 1.198l.325.21.076-.047.251-.163a13.341 13.341 0 0 0 1.546-1.198C11.214 6.754 12 5.479 12 4.25c0-1.085-.598-1.75-1.414-1.75Z"></path></svg>GitHub Sponsors</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Fund open source developers</span></span></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_9m7d_">PROGRAMS</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_9m7d_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://securitylab.github.com" data-analytics-event="{&quot;action&quot;:&quot;security_lab&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;security_lab_link_open_source_navbar&quot;}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Security Lab</span><svg data-component="Octicon" focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://maintainers.github.com" data-analytics-event="{&quot;action&quot;:&quot;maintainer_community&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;maintainer_community_link_open_source_navbar&quot;}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Maintainer Community</span><svg data-component="Octicon" focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://stars.github.com" data-analytics-event="{&quot;action&quot;:&quot;github_stars&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;github_stars_link_open_source_navbar&quot;}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">GitHub Stars</span><svg data-component="Octicon" focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 Primer_Brand__Link-module__Link--is-external___xsncV" href="https://archiveprogram.github.com" data-analytics-event="{&quot;action&quot;:&quot;archive_program&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;archive_program_link_open_source_navbar&quot;}" target="_blank" rel="noreferrer"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Archive Program</span><svg data-component="Octicon" focusable="false" aria-label="External link" class="octicon octicon-link-external" role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_dm7d_">REPOSITORIES</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_dm7d_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/topics" data-analytics-event="{&quot;action&quot;:&quot;topics&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;topics_link_open_source_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Topics</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/trending" data-analytics-event="{&quot;action&quot;:&quot;trending&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;trending_link_open_source_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Trending</span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0" href="https://github.com/collections" data-analytics-event="{&quot;action&quot;:&quot;collections&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;collections_link_open_source_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty">Collections</span></a></li></ul></div></li></ul></div></div></li><li><div class="NavDropdown-module__container__l2YeI"><button type="button" class="NavDropdown-module__button__PEHWX" aria-expanded="false" aria-controls="_R_2nd_">Enterprise<svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-triangle-right NavDropdown-module__buttonIcon__Tkl8_" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m6.427 4.427 3.396 3.396a.25.25 0 0 1 0 .354l-3.396 3.396A.25.25 0 0 1 6 11.396V4.604a.25.25 0 0 1 .427-.177Z"></path></svg></button><div id="_R_2nd_" class="NavDropdown-module__dropdown__xm1jd"><ul class="NavDropdown-module__list__zuCgG"><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_5mnd_">ENTERPRISE SOLUTIONS</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_5mnd_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/enterprise" data-analytics-event="{&quot;action&quot;:&quot;enterprise_platform&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;enterprise&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;enterprise_platform_link_enterprise_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-stack NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M7.122.392a1.75 1.75 0 0 1 1.756 0l5.003 2.902c.83.481.83 1.68 0 2.162L8.878 8.358a1.75 1.75 0 0 1-1.756 0L2.119 5.456a1.251 1.251 0 0 1 0-2.162ZM8.125 1.69a.248.248 0 0 0-.25 0l-4.63 2.685 4.63 2.685a.248.248 0 0 0 .25 0l4.63-2.685ZM1.601 7.789a.75.75 0 0 1 1.025-.273l5.249 3.044a.248.248 0 0 0 .25 0l5.249-3.044a.75.75 0 0 1 .752 1.298l-5.248 3.044a1.75 1.75 0 0 1-1.756 0L1.874 8.814A.75.75 0 0 1 1.6 7.789Zm0 3.5a.75.75 0 0 1 1.025-.273l5.249 3.044a.248.248 0 0 0 .25 0l5.249-3.044a.75.75 0 0 1 .752 1.298l-5.248 3.044a1.75 1.75 0 0 1-1.756 0l-5.248-3.044a.75.75 0 0 1-.273-1.025Z"></path></svg>Enterprise platform</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">AI-powered developer platform</span></span></a></li></ul></div></li><li><div class="NavGroup-module__group__W8SqJ"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--monospace___QXHDQ Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavGroup-module__title__Wzxz2" id="_R_9mnd_">AVAILABLE ADD-ONS</span><ul class="NavGroup-module__list__UCOFy" aria-labelledby="_R_9mnd_"><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/security/advanced-security" data-analytics-event="{&quot;action&quot;:&quot;github_advanced_security&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;enterprise&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;github_advanced_security_link_enterprise_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-shield-check NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m8.533.133 5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667l5.25-1.68a1.748 1.748 0 0 1 1.066 0Zm-.61 1.429.001.001-5.25 1.68a.251.251 0 0 0-.174.237V7c0 1.36.275 2.666 1.057 3.859.784 1.194 2.121 2.342 4.366 3.298a.196.196 0 0 0 .154 0c2.245-.957 3.582-2.103 4.366-3.297C13.225 9.666 13.5 8.358 13.5 7V3.48a.25.25 0 0 0-.174-.238l-5.25-1.68a.25.25 0 0 0-.153 0ZM11.28 6.28l-3.5 3.5a.75.75 0 0 1-1.06 0l-1.5-1.5a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l.97.97 2.97-2.97a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg>GitHub Advanced Security</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Enterprise-grade security features</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/features/copilot/copilot-business" data-analytics-event="{&quot;action&quot;:&quot;copilot_for_business&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;enterprise&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;copilot_for_business_link_enterprise_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-copilot NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M7.998 15.035c-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.201-.508-.254-1.084-.254-1.656 0-.87.128-1.769.693-2.484.579-.733 1.494-1.124 2.724-1.261 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095v1.872c0 .766-3.351 3.795-8.002 3.795Zm0-1.485c2.28 0 4.584-1.11 5.002-1.433V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-1.146 0-2.059-.327-2.71-.991A3.222 3.222 0 0 1 8 6.303a3.24 3.24 0 0 1-.544.743c-.65.664-1.563.991-2.71.991-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433ZM6.762 2.83c-.193-.206-.637-.413-1.682-.297-1.019.113-1.479.404-1.713.7-.247.312-.369.789-.369 1.554 0 .793.129 1.171.308 1.371.162.181.519.379 1.442.379.853 0 1.339-.235 1.638-.54.315-.322.527-.827.617-1.553.117-.935-.037-1.395-.241-1.614Zm4.155-.297c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Z"></path><path d="M6.25 9.037a.75.75 0 0 1 .75.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 .75-.75Zm4.25.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 1.5 0Z"></path></svg>Copilot for Business</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Enterprise-grade AI features</span></span></a></li><li><a class="Primer_Brand__Link-module__Link___lF11y Primer_Brand__Link-module__Link--default___VRVW0 NavLink-module__link__EG3d4" href="https://github.com/enterprise/premium-support" data-analytics-event="{&quot;action&quot;:&quot;premium_support&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;enterprise&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;premium_support_link_enterprise_navbar&quot;}"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Link-module__Link--label___jM8Ty"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS Primer_Brand__Text-module__Text--weight-medium___qJKf_ NavLink-module__title__Q7t0p"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-comment-discussion NavLink-module__icon__ltGNM" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1h8.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 10.25 10H7.061l-2.574 2.573A1.458 1.458 0 0 1 2 11.543V10h-.25A1.75 1.75 0 0 1 0 8.25v-5.5C0 1.784.784 1 1.75 1ZM1.5 2.75v5.5c0 .138.112.25.25.25h1a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h3.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25Zm13 2a.25.25 0 0 0-.25-.25h-.5a.75.75 0 0 1 0-1.5h.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 14.25 12H14v1.543a1.458 1.458 0 0 1-2.487 1.03L9.22 12.28a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l2.22 2.22v-2.19a.75.75 0 0 1 .75-.75h1a.25.25 0 0 0 .25-.25Z"></path></svg>Premium Support</span><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--muted___rE6mh Primer_Brand__Text-module__Text--200____P1wy Primer_Brand__Text-module__Text--antialiased___TYoXS NavLink-module__subtitle__X4gkW">Enterprise-grade 24/7 support</span></span></a></li></ul></div></li></ul></div></div></li><li><a href="https://github.com/pricing" data-analytics-event="{&quot;action&quot;:&quot;pricing&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;pricing&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;pricing_link_pricing_navbar&quot;}" class="MarketingNavigation-module__navLink__hUomM">Pricing</a></li></ul></nav><div class="MarketingHeader-module__ctaContainer__tBmPz"><div class="HeaderSearch-module__searchSlot__oVOUS"><button class="Primer_Brand__Button-module__Button___scH9Z Primer_Brand__Button-module__Button--subtle___F7pEE Primer_Brand__Button-module__Button--size-small___zQrEw HeaderSearch-module__trigger__zsF9q" type="button" aria-haspopup="dialog" aria-expanded="false" aria-label="Search or jump to, type / to search" data-analytics-event="{&quot;action&quot;:&quot;searchbar&quot;,&quot;tag&quot;:&quot;input&quot;,&quot;context&quot;:&quot;global&quot;,&quot;location&quot;:&quot;navbar&quot;,&quot;label&quot;:&quot;searchbar_input_global_navbar&quot;}"><span class="Primer_Brand__Button-module__Button__text___ED0bX"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ Primer_Brand__Button-module__Button--label___qrkyz Primer_Brand__Button-module__Button--label-subtle___8ndWH"><span class="HeaderSearch-module__content__kMpxU"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-search HeaderSearch-module__icon__wcrHX" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg><span class="HeaderSearch-module__label__d1iWG">Search</span><kbd class="HeaderSearch-module__kbd__HNG0o" aria-hidden="true">/</kbd></span></span></span></button><div class="d-none"></div></div><div class="AuthCTAs-module__signInWrap__q2P60"><a class="Primer_Brand__Button-module__Button___scH9Z Primer_Brand__Button-module__Button--subtle___F7pEE Primer_Brand__Button-module__Button--size-small___zQrEw AuthCTAs-module__cta__WpwQq AuthCTAs-module__desktopActionGap__UZuXT AuthCTAs-module__hiddenBelowLg__BfKBw" href="/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrowind%2Falgorithms%2Fblob%2Fmain%2Fsorting%2Finsertsort%2FInsertSort.java" data-analytics-event="{&quot;action&quot;:&quot;sign_in&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;auth_cta&quot;,&quot;location&quot;:&quot;header&quot;,&quot;label&quot;:&quot;sign_in_link_auth_cta_header&quot;}" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;site header menu&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;SIGN_UP&quot;,&quot;originating_url&quot;:&quot;https://github.com/microwind/algorithms/blob/main/sorting/insertsort/InsertSort.java&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="89bf7c689653e0052e8e4443ef48d30dd7a96187ea47222bf415b6eb14cb975c"><span class="Primer_Brand__Button-module__Button__text___ED0bX"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ Primer_Brand__Button-module__Button--label___qrkyz Primer_Brand__Button-module__Button--label-subtle___8ndWH">Sign in</span></span></a></div><a class="Primer_Brand__Button-module__Button___scH9Z Primer_Brand__Button-module__Button--secondary___gHnw_ Primer_Brand__Button-module__Button--size-small___zQrEw AuthCTAs-module__cta__WpwQq" href="/signup?ref_cta=Sign+up&amp;ref_loc=header+logged+out&amp;ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fblob%2Fshow&amp;source=header-repo&amp;source_repo=microwind%2Falgorithms" data-analytics-event="{&quot;action&quot;:&quot;sign_up&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;context&quot;:&quot;auth_cta&quot;,&quot;location&quot;:&quot;header&quot;,&quot;label&quot;:&quot;sign_up_link_auth_cta_header&quot;}" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;site header menu&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;SIGN_UP&quot;,&quot;originating_url&quot;:&quot;https://github.com/microwind/algorithms/blob/main/sorting/insertsort/InsertSort.java&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="89bf7c689653e0052e8e4443ef48d30dd7a96187ea47222bf415b6eb14cb975c"><span class="Primer_Brand__Button-module__Button__text___ED0bX"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ Primer_Brand__Button-module__Button--label___qrkyz Primer_Brand__Button-module__Button--label-secondary___eJ0_a">Sign up</span></span></a><button class="Primer_Brand__Button-module__Button___scH9Z Primer_Brand__Button-module__Button--subtle___F7pEE Primer_Brand__Button-module__Button--size-small___zQrEw HeaderAppearanceSettings-module__trigger__hUheK" type="button" aria-haspopup="dialog" aria-labelledby="_R_fbd_"><span class="Primer_Brand__Button-module__Button__leading-visual___jjtTe" data-testid="Button-leading-visual"><svg data-component="Octicon" focusable="false" aria-hidden="true" class="octicon octicon-sliders Primer_Brand__Button-module__Button__icon-visual____qybb" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M15 2.75a.75.75 0 0 1-.75.75h-4a.75.75 0 0 1 0-1.5h4a.75.75 0 0 1 .75.75Zm-8.5.75v1.25a.75.75 0 0 0 1.5 0v-4a.75.75 0 0 0-1.5 0V2H1.75a.75.75 0 0 0 0 1.5H6.5Zm1.25 5.25a.75.75 0 0 0 0-1.5h-6a.75.75 0 0 0 0 1.5h6ZM15 8a.75.75 0 0 1-.75.75H11.5V10a.75.75 0 1 1-1.5 0V6a.75.75 0 0 1 1.5 0v1.25h2.75A.75.75 0 0 1 15 8Zm-9 5.25v-2a.75.75 0 0 0-1.5 0v1.25H1.75a.75.75 0 0 0 0 1.5H4.5v1.25a.75.75 0 0 0 1.5 0v-2Zm9 0a.75.75 0 0 1-.75.75h-6a.75.75 0 0 1 0-1.5h6a.75.75 0 0 1 .75.75Z"></path></svg></span><span class="Primer_Brand__Button-module__Button__text___ED0bX"><span class="Primer_Brand__Text-module__Text___XeGJJ Primer_Brand__Text-module__Text-font--mona-sans___a8XJD Primer_Brand__Text-module__Text--default___GhPh_ Primer_Brand__Text-module__Text--100___B2ueX Primer_Brand__Text-module__Text--weight-medium___qJKf_ Primer_Brand__Button-module__Button--label___qrkyz Primer_Brand__Button-module__Button--label-subtle___8ndWH"></span></span></button><div class="Primer_Brand__Tooltip-module__Tooltip___0Eipx" data-direction="s" aria-hidden="true" id="_R_fbd_">Appearance settings</div></div></div></div></div><div class="MarketingHeader-module__bottomBorder__uZT38" aria-hidden="true"></div></header></div></div>
</react-partial>



      <div hidden="hidden" data-view-component="true" class="js-stale-session-flash stale-session-flash flash flash-warn flash-full">
  
        <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert">
    <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path>
</svg>
        <span class="js-stale-session-flash-signed-in" hidden>You signed in with another tab or window. <a class="Link--inTextBlock" href="">Reload</a> to refresh your session.</span>
        <span class="js-stale-session-flash-signed-out" hidden>You signed out in another tab or window. <a class="Link--inTextBlock" href="">Reload</a> to refresh your session.</span>
        <span class="js-stale-session-flash-switched" hidden>You switched accounts on another tab or window. <a class="Link--inTextBlock" href="">Reload</a> to refresh your session.</span>

    <button id="icon-button-135b466d-099d-48f9-b54f-9fd09cb1355c" aria-labelledby="tooltip-c4f0b837-1dff-4de2-b3d2-65e96e664ed7" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium flash-close js-flash-close">  <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x Button-visual">
    <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path>
</svg>
</button><tool-tip id="tooltip-c4f0b837-1dff-4de2-b3d2-65e96e664ed7" for="icon-button-135b466d-099d-48f9-b54f-9fd09cb1355c" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Dismiss alert</tool-tip>


  
</div>
    </div>

  <div id="start-of-content" class="show-on-focus"></div>








    <div id="js-flash-container" class="flash-container" data-turbo-replace>






  <template class="js-flash-template">
    
<div class="flash flash-full   {{ className }}">
  <div >
    <button autofocus class="flash-close js-flash-close" type="button" aria-label="Dismiss this message">
      <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x">
    <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path>
</svg>
    </button>
    <div aria-atomic="true" role="alert" class="js-flash-alert">
      
      <div>{{ message }}</div>

    </div>
  </div>
</div>
  </template>
</div>


    






  <div
    class="application-main "
    data-commit-hovercards-enabled
    data-discussion-hovercards-enabled
    data-issue-and-pr-hovercards-enabled
    data-project-hovercards-enabled
  >
        <div itemscope itemtype="http://schema.org/SoftwareSourceCode" class="">
    <main id="js-repo-pjax-container" >
      
      
    


    








  

    <link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/ym-4c4d2b70d5b17037.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/mng-af5547fcfd291f53.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/t5-8ffaa093c3420000.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/j24-43443b443f213349.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/vw-9a8839ba1b0498ae.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/ac-330683e1e1b3028b.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/f4t-6a4e2ce1a3f6bcd5.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/36-e7bb48b69e86f71b.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/tps-84accc305677e828.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/e8k-f5cca939ef074708.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/nx-e5a4a427b19a5363.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/3s-7ab43a292b98ba5f.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/a1w-8b2cb4a1188ed337.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/nr-79588a4a563e6198.js" fetchpriority="low" />
<link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/global-nav-bar-2b07b8ab08f594ac.js" fetchpriority="low" />
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react-css.e4334163c54cccf5.module.css" />
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/45z.922f816fb2d6b268.module.css" />
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-nav-bar.b71e2cfbb18d6882.module.css" />

<react-partial
  partial-name="global-nav-bar"
  data-ssr="true"
  data-attempted-ssr="true"
  data-react-profiling="false"
>
  
  <script type="application/json" data-target="react-partial.embeddedData">{"props":{"contextRegion":{"crumbs":[{"crumb_type":"organization","label":"microwind","is_root":false,"href":"/microwind"},{"crumb_type":"repository","label":"algorithms","is_root":false,"href":"/microwind/algorithms"}],"localNavigation":[{"id":"code","icon":"code","label":"Code","href":"/microwind/algorithms","selectedLinks":["repo_source","repo_downloads","repo_commits","repo_releases","repo_tags","repo_branches","repo_packages","repo_deployments","repo_attestations"],"popoverTarget":false,"commandId":"repositories:go-to-code","reactNav":{"appTarget":"code-view","anchor":"code-view-repo-link"},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"issues","icon":"issue-opened","label":"Issues","href":"/microwind/algorithms/issues","selectedLinks":["repo_issues","repo_labels","repo_milestones"],"count":0,"popoverTarget":false,"commandId":"repositories:go-to-issues","reactNav":{"appTarget":"repo","anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"pull-requests","icon":"git-pull-request","label":"Pull requests","href":"/microwind/algorithms/pulls","selectedLinks":["repo_pulls","checks"],"count":0,"popoverTarget":false,"commandId":"repositories:go-to-pull-requests","reactNav":{"appTarget":null,"anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"actions","icon":"play","label":"Actions","href":"/microwind/algorithms/actions","selectedLinks":["repo_actions"],"popoverTarget":false,"commandId":"repositories:go-to-actions","reactNav":{"appTarget":"actions-workflows","anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"projects","icon":"table","label":"Projects","href":"/microwind/algorithms/projects","selectedLinks":["repo_projects","new_repo_project","repo_project"],"popoverTarget":false,"commandId":"repositories:go-to-projects","reactNav":{"appTarget":"repo","anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"security-and-quality","icon":"shield","label":"Security and quality","href":"/microwind/algorithms/security","selectedLinks":["security","overview","alerts","policy","token_scanning","code_scanning"],"count":0,"popoverTarget":false,"commandId":"repositories:go-to-security","reactNav":{"appTarget":null,"anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"insights","icon":"graph","label":"Insights","href":"/microwind/algorithms/pulse","selectedLinks":["repo_graphs","repo_contributors","dependency_graph","dependabot_updates","pulse","people","community"],"popoverTarget":false,"commandId":"repositories:go-to-insights","reactNav":{"appTarget":null,"anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}}],"localNavigationUpdateChannel":null,"selectedLink":"repo_source"},"owner":null,"headerLogo":{"href":"/","aria-label":"Homepage "},"notifications":{"indicatorMode":"disabled","websocketChannel":null,"fetchIndicatorSrc":"/notifications/indicator","fetchIndicatorEnabled":false},"issues":{"href":"/issues"},"pulls":{"href":"/pulls"},"contributedRepos":{"href":"/repos"},"copilot":{"show":false,"showAgentsButton":false,"showRelaunchAnnouncement":false,"copilotChatUrl":null,"copilotApiUrl":"https://api.githubcopilot.com"},"search":{"show":true,"showCommandPalette":false,"isSearchPage":false,"isJumpToSearch":false,"searchContext":{"scope":"repo:microwind/algorithms","current_repo_name":"algorithms","current_repo_nwo":"microwind/algorithms","current_repo_org":"microwind","user_id":"microwind"}},"commandPalette":null,"enterpriseBar":{"show":false},"globalTransactionalMessage":[],"payloadsUrl":"/_global-navigation/payloads.json?can_toggle_site_admin_and_employee_status=0\u0026is_admin_mode_on=0\u0026is_ui_opted_out=0\u0026show_ui_opt_out=0\u0026v=6","contextRegionUrl":"/_global-navigation/context-region.json"}}</script>
  <div data-target="react-partial.reactRoot"><header aria-label="Global navigation menu" data-component="Stack" class="GlobalNav styles-module__appHeader__YzYWk prc-Stack-Stack-UQ9k6" data-gap="none" data-direction="vertical" data-align="stretch" data-wrap="nowrap" data-justify="start" data-padding="none"><div data-component="Stack" class="prc-Stack-Stack-UQ9k6" data-direction="horizontal" data-align="center" data-wrap="nowrap" data-justify="center" data-padding="none"><div data-testid="top-nav-center" data-component="Stack" class="styles-module__center__R3QRv styles-module__withLocalNavigation__rjTJ_ GlobalNavBar-module__loggedOut__Jv1rk prc-Stack-Stack-UQ9k6" data-gap="condensed" data-direction="horizontal" data-align="stretch" data-wrap="nowrap" data-justify="start" data-padding="normal"><nav class="styles-module__contextRegion__VbSp2 prc-Breadcrumbs-BreadcrumbsBase-3Gb-B" aria-label="Breadcrumbs" data-overflow="menu" data-variant="normal" data-component="Breadcrumbs"><ol class="prc-Breadcrumbs-BreadcrumbsList-BKjpe"><li class="prc-Breadcrumbs-ItemWrapper-k0NLn"><a class="styles-module__contextCrumb__IzGIq prc-Breadcrumbs-Item-jcraJ" data-component="Breadcrumbs.Item" href="/microwind" data-discover="true"><span class="">microwind</span></a></li><li class="prc-Breadcrumbs-ItemWrapper-k0NLn"><a class="styles-module__contextCrumb__IzGIq prc-Breadcrumbs-Item-jcraJ" data-component="Breadcrumbs.Item" href="/microwind/algorithms" data-discover="true"><span class="styles-module__contextCrumbLast__tI2e3">algorithms</span></a></li></ol></nav></div><div data-testid="top-nav-right" data-component="Stack" class="styles-module__right__mlBQg styles-module__withLocalNavigation__rjTJ_ styles-module__rightWithResponsiveCreateButton__SKn2W prc-Stack-Stack-UQ9k6" data-gap="condensed" data-direction="horizontal" data-align="center" data-wrap="nowrap" data-justify="start" data-padding="normal"></div></div><h2 class="prc-src-InternalVisuallyHidden-2YaI6">Repository navigation</h2><nav class="prc-components-UnderlineWrapper-eT-Yj prc-UnderlineNav-UnderlineWrapper-GWONT LocalNavigation-module__LocalNavigation__b0Xc0" aria-label="Repository" data-variant="inset" data-overflow-mode="wrap" data-hide-icons-breakpoint="medium"><ul class="prc-UnderlineNav-ItemsList-oj8gN prc-components-UnderlineItemList-xKlKC" role="list"><li role="presentation" aria-hidden="true" class="prc-UnderlineNav-WrapSpacer--aLgz"></li><li class="prc-UnderlineNav-UnderlineNavItem-syRjR"><a aria-current="page" data-tab-item="code" data-react-nav="code-view" data-react-nav-anchor="code-view-repo-link" data-turbo-frame="repo-content-turbo-frame" class="prc-components-UnderlineItem-7fP-n" href="/microwind/algorithms" data-discover="true"><span data-component="icon"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-code" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path></svg></span><span data-component="text" data-content="Code">Code</span></a></li><li class="prc-UnderlineNav-UnderlineNavItem-syRjR"><a data-tab-item="issues" data-react-nav="repo" data-turbo-frame="repo-content-turbo-frame" class="prc-components-UnderlineItem-7fP-n" href="/microwind/algorithms/issues" data-discover="true"><span data-component="icon"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-issue-opened" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path></svg></span><span data-component="text" data-content="Issues">Issues</span></a></li><li class="prc-UnderlineNav-UnderlineNavItem-syRjR"><a data-tab-item="pull-requests" data-turbo-frame="repo-content-turbo-frame" class="prc-components-UnderlineItem-7fP-n" href="/microwind/algorithms/pulls" data-discover="true"><span data-component="icon"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-git-pull-request" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path></svg></span><span data-component="text" data-content="Pull requests">Pull requests</span></a></li><li class="prc-UnderlineNav-UnderlineNavItem-syRjR"><a data-tab-item="actions" data-react-nav="actions-workflows" data-turbo-frame="repo-content-turbo-frame" class="prc-components-UnderlineItem-7fP-n" href="/microwind/algorithms/actions" data-discover="true"><span data-component="icon"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-play" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path></svg></span><span data-component="text" data-content="Actions">Actions</span></a></li><li class="prc-UnderlineNav-UnderlineNavItem-syRjR"><a data-tab-item="projects" data-react-nav="repo" data-turbo-frame="repo-content-turbo-frame" class="prc-components-UnderlineItem-7fP-n" href="/microwind/algorithms/projects" data-discover="true"><span data-component="icon"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-table" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25ZM6.5 6.5v8h7.75a.25.25 0 0 0 .25-.25V6.5Zm8-1.5V1.75a.25.25 0 0 0-.25-.25H6.5V5Zm-13 1.5v7.75c0 .138.112.25.25.25H5v-8ZM5 5V1.5H1.75a.25.25 0 0 0-.25.25V5Z"></path></svg></span><span data-component="text" data-content="Projects">Projects</span></a></li><li class="prc-UnderlineNav-UnderlineNavItem-syRjR"><a data-tab-item="security-and-quality" data-turbo-frame="repo-content-turbo-frame" class="prc-components-UnderlineItem-7fP-n" href="/microwind/algorithms/security" data-discover="true"><span data-component="icon"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-shield" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M7.467.133a1.748 1.748 0 0 1 1.066 0l5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667Zm.61 1.429a.25.25 0 0 0-.153 0l-5.25 1.68a.25.25 0 0 0-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.196.196 0 0 0 .154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.251.251 0 0 0-.174-.237l-5.25-1.68ZM8.75 4.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 1.5 0ZM9 10.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg></span><span data-component="text" data-content="Security and quality">Security and quality</span></a></li><li class="prc-UnderlineNav-UnderlineNavItem-syRjR"><a data-tab-item="insights" data-turbo-frame="repo-content-turbo-frame" class="prc-components-UnderlineItem-7fP-n" href="/microwind/algorithms/pulse" data-discover="true"><span data-component="icon"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-graph" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg></span><span data-component="text" data-content="Insights">Insights</span></a></li></ul><div class="prc-UnderlineNav-MoreButtonContainer-Dnrq6"><div class="prc-UnderlineNav-MoreButtonDivider-dN0a-"></div><button data-component="overflow-menu-button" type="button" aria-haspopup="true" aria-expanded="false" tabindex="0" class="prc-Button-ButtonBase-9n-Xk prc-UnderlineNav-MoreButton-Y8soj" data-loading="false" data-size="medium" data-variant="invisible" id="_R_2ktl_"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5"><span data-component="text" class="prc-Button-Label-FWkx3"><span>More<span class="prc-src-InternalVisuallyHidden-2YaI6"> items</span></span></span></span><span data-component="trailingAction" class="prc-Button-Visual-YNt2F prc-Button-VisualWrap-E4cnq"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-triangle-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></span></button></div></nav><div class="d-none"></div></header></div>
</react-partial>


  



<turbo-frame id="repo-content-turbo-frame" target="_top" data-turbo-action="advance" class="">
    <div id="repo-content-pjax-container" class="repository-content " >
    



    
      
    








<react-app
  app-name="code-view"
  initial-path="/microwind/algorithms/blob/main/sorting/insertsort/InsertSort.java"
  style="display: block; min-height: calc(100vh - 64px);"
  data-attempted-ssr="true"
  data-ssr="true"
  data-lazy="false"
  data-alternate="false"
  data-data-router-enabled="true"
  data-react-profiling="false"
>
  
  <script type="application/json" data-target="react-app.embeddedData">{"payload":{"codeViewBlobRoute":{"csv":null,"csvError":null,"headerInfo":{"toc":null},"issueTemplate":null,"discussionTemplate":null,"richText":null,"richTextTruncated":false,"renderedFileInfo":null,"symbols":{"timed_out":false,"not_analyzed":false,"symbols":[{"name":"InsertSort","fully_qualified_name":"InsertSort","kind":"class","ident_start":273,"ident_end":283,"extent_start":260,"extent_end":10360,"ident_utf16":{"start":{"line_number":14,"utf16_col":13},"end":{"line_number":14,"utf16_col":23}},"extent_utf16":{"start":{"line_number":14,"utf16_col":0},"end":{"line_number":293,"utf16_col":1}}},{"name":"printArray","fully_qualified_name":"InsertSort::printArray","kind":"method","ident_start":368,"ident_end":378,"extent_start":348,"extent_end":476,"ident_utf16":{"start":{"line_number":19,"utf16_col":24},"end":{"line_number":19,"utf16_col":34}},"extent_utf16":{"start":{"line_number":19,"utf16_col":4},"end":{"line_number":21,"utf16_col":5}}},{"name":"performanceTest","fully_qualified_name":"InsertSort::performanceTest","kind":"method","ident_start":550,"ident_end":565,"extent_start":530,"extent_end":1149,"ident_utf16":{"start":{"line_number":26,"utf16_col":24},"end":{"line_number":26,"utf16_col":39}},"extent_utf16":{"start":{"line_number":26,"utf16_col":4},"end":{"line_number":39,"utf16_col":5}}},{"name":"testData","fully_qualified_name":"InsertSort::testData","kind":"field","ident_start":1299,"ident_end":1307,"extent_start":1272,"extent_end":1336,"ident_utf16":{"start":{"line_number":44,"utf16_col":31},"end":{"line_number":44,"utf16_col":39}},"extent_utf16":{"start":{"line_number":44,"utf16_col":4},"end":{"line_number":44,"utf16_col":68}}},{"name":"insertSort1","fully_qualified_name":"InsertSort::insertSort1","kind":"method","ident_start":2012,"ident_end":2023,"extent_start":1993,"extent_end":2997,"ident_utf16":{"start":{"line_number":62,"utf16_col":23},"end":{"line_number":62,"utf16_col":34}},"extent_utf16":{"start":{"line_number":62,"utf16_col":4},"end":{"line_number":85,"utf16_col":5}}},{"name":"insertSort2","fully_qualified_name":"InsertSort::insertSort2","kind":"method","ident_start":3520,"ident_end":3531,"extent_start":3501,"extent_end":4421,"ident_utf16":{"start":{"line_number":102,"utf16_col":23},"end":{"line_number":102,"utf16_col":34}},"extent_utf16":{"start":{"line_number":102,"utf16_col":4},"end":{"line_number":122,"utf16_col":5}}},{"name":"insertSort3","fully_qualified_name":"InsertSort::insertSort3","kind":"method","ident_start":4909,"ident_end":4920,"extent_start":4890,"extent_end":6007,"ident_utf16":{"start":{"line_number":140,"utf16_col":23},"end":{"line_number":140,"utf16_col":34}},"extent_utf16":{"start":{"line_number":140,"utf16_col":4},"end":{"line_number":175,"utf16_col":5}}},{"name":"insertSort4","fully_qualified_name":"InsertSort::insertSort4","kind":"method","ident_start":6535,"ident_end":6546,"extent_start":6516,"extent_end":7358,"ident_utf16":{"start":{"line_number":193,"utf16_col":23},"end":{"line_number":193,"utf16_col":34}},"extent_utf16":{"start":{"line_number":193,"utf16_col":4},"end":{"line_number":217,"utf16_col":5}}},{"name":"insertSort5","fully_qualified_name":"InsertSort::insertSort5","kind":"method","ident_start":8092,"ident_end":8103,"extent_start":8073,"extent_end":9080,"ident_utf16":{"start":{"line_number":237,"utf16_col":23},"end":{"line_number":237,"utf16_col":34}},"extent_utf16":{"start":{"line_number":237,"utf16_col":4},"end":{"line_number":261,"utf16_col":5}}},{"name":"SortFunction","fully_qualified_name":"InsertSort::SortFunction","kind":"interface","ident_start":9211,"ident_end":9223,"extent_start":9168,"extent_end":9261,"ident_utf16":{"start":{"line_number":266,"utf16_col":22},"end":{"line_number":266,"utf16_col":34}},"extent_utf16":{"start":{"line_number":265,"utf16_col":4},"end":{"line_number":268,"utf16_col":5}}},{"name":"sort","fully_qualified_name":"InsertSort::SortFunction::sort","kind":"method","ident_start":9239,"ident_end":9243,"extent_start":9234,"extent_end":9255,"ident_utf16":{"start":{"line_number":267,"utf16_col":13},"end":{"line_number":267,"utf16_col":17}},"extent_utf16":{"start":{"line_number":267,"utf16_col":8},"end":{"line_number":267,"utf16_col":29}}},{"name":"main","fully_qualified_name":"InsertSort::main","kind":"method","ident_start":9286,"ident_end":9290,"extent_start":9267,"extent_end":10358,"ident_utf16":{"start":{"line_number":270,"utf16_col":23},"end":{"line_number":270,"utf16_col":27}},"extent_utf16":{"start":{"line_number":270,"utf16_col":4},"end":{"line_number":292,"utf16_col":5}}}]}},"codeViewLayoutRoute":{"repo":{"id":276782021,"defaultBranch":"main","name":"algorithms","ownerLogin":"microwind","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2020-07-03T01:44:38.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/67299763?v=4","public":true,"private":false,"isOrgOwned":true,"isArchived":false},"currentUser":null,"uploadToken":"GYqDwiKTJjX68KoVtIahT9Hq0ePBc9zNJ9CUjmMYwF_vJ3K-q4ALcLb1pDXmi5qqwMkwvkACjL2eF50Lzkphog","allShortcutsEnabled":false,"treeExpanded":true,"path":"sorting/insertsort/InsertSort.java","symbolsExpanded":false,"refInfo":{"name":"main","listCacheKey":"v0:1774838375.0","canEdit":false,"currentOid":"638e72cee4f922e1b382d0dc523b1886630e5e6b"},"helpUrl":"https://docs.github.com","githubDevUrl":null},"codeViewFileTreeLayoutRoute":{"fileTree":{"sorting/insertsort":{"items":[{"name":"AI时代-重温插入排序-不同实现思路详解.md","path":"sorting/insertsort/AI时代-重温插入排序-不同实现思路详解.md","contentType":"file"},{"name":"InsertSort.java","path":"sorting/insertsort/InsertSort.java","contentType":"file"},{"name":"InsertSort.kt","path":"sorting/insertsort/InsertSort.kt","contentType":"file"},{"name":"InsertSort.ts","path":"sorting/insertsort/InsertSort.ts","contentType":"file"},{"name":"README.md","path":"sorting/insertsort/README.md","contentType":"file"},{"name":"insert_sort.c","path":"sorting/insertsort/insert_sort.c","contentType":"file"},{"name":"insert_sort.cpp","path":"sorting/insertsort/insert_sort.cpp","contentType":"file"},{"name":"insert_sort.dart","path":"sorting/insertsort/insert_sort.dart","contentType":"file"},{"name":"insert_sort.go","path":"sorting/insertsort/insert_sort.go","contentType":"file"},{"name":"insert_sort.js","path":"sorting/insertsort/insert_sort.js","contentType":"file"},{"name":"insert_sort.py","path":"sorting/insertsort/insert_sort.py","contentType":"file"},{"name":"insert_sort.rs","path":"sorting/insertsort/insert_sort.rs","contentType":"file"},{"name":"insert_sort.swift","path":"sorting/insertsort/insert_sort.swift","contentType":"file"}],"totalCount":13},"sorting":{"items":[{"name":"bubblesort","path":"sorting/bubblesort","contentType":"directory"},{"name":"bucketsort","path":"sorting/bucketsort","contentType":"directory"},{"name":"countingsort","path":"sorting/countingsort","contentType":"directory"},{"name":"heapsort","path":"sorting/heapsort","contentType":"directory"},{"name":"insertsort","path":"sorting/insertsort","contentType":"directory"},{"name":"mergesort","path":"sorting/mergesort","contentType":"directory"},{"name":"quicksort","path":"sorting/quicksort","contentType":"directory"},{"name":"radixsort","path":"sorting/radixsort","contentType":"directory"},{"name":"selectionsort","path":"sorting/selectionsort","contentType":"directory"},{"name":"shellsort","path":"sorting/shellsort","contentType":"directory"},{"name":"10-Sorting-Algorithms-Multi-Language.md","path":"sorting/10-Sorting-Algorithms-Multi-Language.md","contentType":"file"},{"name":"AI-Era-Top-10-Sorting-Algorithms.md","path":"sorting/AI-Era-Top-10-Sorting-Algorithms.md","contentType":"file"},{"name":"README.md","path":"sorting/README.md","contentType":"file"}],"totalCount":13},"":{"items":[{"name":"algorithmic-thinking","path":"algorithmic-thinking","contentType":"directory"},{"name":"array","path":"array","contentType":"directory"},{"name":"bit-manipulation","path":"bit-manipulation","contentType":"directory"},{"name":"compression","path":"compression","contentType":"directory"},{"name":"cryptography","path":"cryptography","contentType":"directory"},{"name":"data-structures","path":"data-structures","contentType":"directory"},{"name":"date-time","path":"date-time","contentType":"directory"},{"name":"docs","path":"docs","contentType":"directory"},{"name":"graph","path":"graph","contentType":"directory"},{"name":"math","path":"math","contentType":"directory"},{"name":"network-flow","path":"network-flow","contentType":"directory"},{"name":"practice-projects","path":"practice-projects","contentType":"directory"},{"name":"problem-sets","path":"problem-sets","contentType":"directory"},{"name":"recursion","path":"recursion","contentType":"directory"},{"name":"resources","path":"resources","contentType":"directory"},{"name":"searching","path":"searching","contentType":"directory"},{"name":"sorting","path":"sorting","contentType":"directory"},{"name":"start-here","path":"start-here","contentType":"directory"},{"name":"string","path":"string","contentType":"directory"},{"name":"tree","path":"tree","contentType":"directory"},{"name":".claudeignore","path":".claudeignore","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"CLAUDE.md","path":"CLAUDE.md","contentType":"file"},{"name":"CONTRIBUTING.md","path":"CONTRIBUTING.md","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"README_en.md","path":"README_en.md","contentType":"file"},{"name":"STRUCTURE.md","path":"STRUCTURE.md","contentType":"file"}],"totalCount":28}},"fileTreeProcessingTime":56.300101,"foldersToFetch":[]},"codeViewBlobLayoutRoute":{"codeLineWrapEnabled":false,"refInfo":{"name":"main","listCacheKey":"v0:1774838375.0","canEdit":false,"refType":"branch","currentOid":"638e72cee4f922e1b382d0dc523b1886630e5e6b","canEditOnDefaultBranch":false,"fileExistsOnDefault":true},"path":"sorting/insertsort/InsertSort.java","blob":{"copilotSWEAgentEnabled":false,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/microwind/algorithms/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"InsertSort.java","displayUrl":"https://github.com/microwind/algorithms/blob/main/sorting/insertsort/InsertSort.java?raw=true","headerInfo":{"blobSize":"12.8 KB","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":"https://desktop.github.com","isGitLfs":false,"onBranch":true,"shortPath":"75cc44e","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrowind%2Falgorithms%2Fblob%2Fmain%2Fsorting%2Finsertsort%2FInsertSort.java","isCSV":false,"isRichtext":false,"lineInfo":{"truncatedLoc":"354","truncatedSloc":"302"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"isIssueTemplate":false,"isDiscussionTemplate":false,"language":"Java","languageID":181,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/microwind/algorithms/blob/main/sorting/insertsort/InsertSort.java","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/microwind/algorithms/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/microwind/algorithms/raw/refs/heads/main/sorting/insertsort/InsertSort.java","renderImageOrRaw":false,"shortPath":null,"symbolsEnabled":true,"tabSize":4,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null},"copilotInfo":null,"copilotAccessAllowed":false,"copilotSpacesEnabled":false,"modelsAccessAllowed":false,"modelsRepoIntegrationEnabled":false,"isMarketplaceEnabled":true},"codeViewBlobLayoutRoute.StyledBlob":{"rawLines":["/**"," * Copyright © https://github.com/microwind All rights reserved."," * "," * @author: jarryli@gmail.com"," * @version: 1.0"," */","","/**"," * 插入排序算法实现"," * 提供5种不同的实现方式，适合不同场景和性能需求"," */","","import java.util.Arrays;","","public class InsertSort {","","    /**","     * 打印数组内容的辅助函数","     */","    private static void printArray(int[] arr, String label) {","        System.out.println(label + \": \" + Arrays.toString(arr));","    }","","    /**","     * 性能测试辅助函数","     */","    private static void performanceTest(SortFunction sortFunc, int[] arr, String name) {","        // 创建数组副本，避免修改原数组","        int[] testArr = Arrays.copyOf(arr, arr.length);","        printArray(testArr, name + \"原始数组\");","        ","        // 开始计时","        long startTime = System.nanoTime();","        sortFunc.sort(testArr);","        long endTime = System.nanoTime();","        ","        System.out.println(name + \": \" + String.format(\"%.3f\", (endTime - startTime) / 1_000_000.0) + \"ms\");","        printArray(testArr, name + \"排序结果\");","        System.out.println(); // 空行分隔","    }","","    // ==================== 主程序：算法演示和性能测试 ====================","    ","    // 测试数据：","    private static final int[] testData = {7, 11, 9, 10, 12, 13, 8};","","    /**","     * 插入排序基础版本 - 标准实现","     * ","     * 算法原理：","     * 1. 从第二个元素开始，将其作为\"当前元素\"","     * 2. 将当前元素与前面已排序的元素比较","     * 3. 找到合适的位置插入当前元素","     * 4. 重复步骤1-3，直到所有元素都排序完成","     * ","     * 生活类比：就像整理手中的扑克牌，","     * 每次拿起一张新牌，插入到手中已排序牌的合适位置","     * ","     * 时间复杂度：平均O(n²)，最好O(n)，最坏O(n²)","     * 空间复杂度：O(1) - 原地排序","     * 稳定性：稳定 - 保持相等元素的相对位置","     */","    public static void insertSort1(int[] arr) {","        System.out.println(\"insertSort1 standard:\");","        ","        // 第一步：从第二个元素开始遍历","        for (int i = 1; i \u003c arr.length; i++) {","            int j = i - 1;","            // 待排序中的比较项","            int current = arr[i];","            System.out.println(\"i=\" + i + \" j=\" + j + \" current=\" + current + \" arr[i]=\" + arr[i] + \" arr[j + 1]=\" + arr[j + 1] + \" arr[]=\" + Arrays.toString(arr));","            ","            // 第二步：向前查找插入位置，同时移动元素","            while (j \u003e= 0 \u0026\u0026 current \u003c arr[j]) {","                // 将比较项跟已排序列表项逐个对比","                // 如果比较项小于列表项，则将列表项逐个右移","                arr[j + 1] = arr[j];","                j--;","            }","            ","            // 第三步：将比较项插入到空出的位置","            arr[j + 1] = current;","        }","        ","        printArray(arr, \"排序后数组\");","    }","","    /**","     * 插入排序优化版本 - 二分查找插入位置","     * ","     * 算法思路：","     * 使用二分查找确定插入位置，减少比较次数","     * 保持插入操作，但优化查找过程","     * ","     * 优化效果：","     * - 减少比较次数：从O(n)到O(log n)","     * - 保持插入操作的时间复杂度","     * ","     * 时间复杂度：平均O(n²)，最好O(n log n)，最坏O(n²)","     * 空间复杂度：O(1) - 原地排序","     * 稳定性：稳定","     */","    public static void insertSort2(int[] arr) {","        System.out.println(\"insertSort2 for loop ascending:\");","        ","        // 第一步：外循环是待排序列表，内循环是已排序列表","        // 这里i可以自1开始","        for (int i = 1; i \u003c arr.length; i++) {","            int j = i - 1;","            int current = arr[i];","            System.out.println(\"i=\" + i + \" j=\" + j + \" current=\" + current + \" arr[i]=\" + arr[i] + \" arr[j + 1]=\" + arr[j + 1] + \" arr[]=\" + Arrays.toString(arr));","            ","            // 第二步：如果当前项比已排序项小，把已比较项逐个右移，空出位置来给当前项","            for (; j \u003e= 0 \u0026\u0026 current \u003c arr[j]; j--) {","                arr[j + 1] = arr[j];","            }","            ","            // 第三步：将当前项插入到正确位置","            arr[j + 1] = current;","        }","        ","        printArray(arr, \"排序后数组\");","    }","","    /**","     * 插入排序 - 哨兵版本","     * ","     * 算法思路：","     * 在数组开头添加哨兵元素，简化边界检查","     * 减少循环中的条件判断","     * ","     * 优化效果：","     * - 减少边界检查","     * - 简化代码逻辑","     * - 轻微的性能提升","     * ","     * 时间复杂度：平均O(n²)，最好O(n)，最坏O(n²)","     * 空间复杂度：O(1) - 原地排序（忽略哨兵）","     * 稳定性：稳定","     */","    public static void insertSort3(int[] arr) {","        System.out.println(\"insertSort3 sentinel:\");","        ","        if (arr.length == 0) return;","        ","        // 第一步：找到最小值作为哨兵","        int minIndex = 0;","        for (int i = 1; i \u003c arr.length; i++) {","            if (arr[i] \u003c arr[minIndex]) {","                minIndex = i;","            }","        }","        ","        // 第二步：将最小值移到开头作为哨兵","        if (minIndex != 0) {","            int temp = arr[0];","            arr[0] = arr[minIndex];","            arr[minIndex] = temp;","        }","        ","        // 第三步：从第三个元素开始排序（第二个元素已经相对于哨兵有序）","        for (int i = 2; i \u003c arr.length; i++) {","            int current = arr[i];","            int j = i;","            ","            // 第四步：向前查找插入位置（哨兵保证不会越界）","            while (arr[j - 1] \u003e current) {","                arr[j] = arr[j - 1];","                j--;","            }","            ","            arr[j] = current;","        }","        ","        printArray(arr, \"排序后数组\");","    }","","    /**","     * 插入排序 - 希尔插入版本","     * ","     * 算法思路：","     * 结合希尔排序的增量概念","     * 对不同间隔的子序列进行插入排序","     * ","     * 优化效果：","     * - 更好的初始数据分布","     * - 减少总的移动次数","     * - 适合部分有序的数据","     * ","     * 时间复杂度：平均O(n^1.3)，取决于增量序列","     * 空间复杂度：O(1) - 原地排序","     * 稳定性：不稳定 - 增量排序可能破坏稳定性","     */","    public static void insertSort4(int[] arr) {","        System.out.println(\"insertSort4 shell insertion:\");","        ","        int n = arr.length;","        ","        // 第一步：使用希尔增量序列","        for (int gap = n / 2; gap \u003e 0; gap /= 2) {","            // 第二步：对每个增量进行插入排序","            for (int i = gap; i \u003c n; i++) {","                int current = arr[i];","                int j = i;","                ","                // 第三步：在增量子序列中进行插入排序","                while (j \u003e= gap \u0026\u0026 arr[j - gap] \u003e current) {","                    arr[j] = arr[j - gap];","                    j -= gap;","                }","                ","                // 第四步：插入当前元素","                arr[j] = current;","            }","        }","        ","        printArray(arr, \"排序后数组\");","    }","","    /**","     * 插入排序降序版本","     * ","     * 算法思路：","     * 1. 从第二个元素开始，将其作为\"当前元素\"","     * 2. 将当前元素与前面已排序的元素比较（降序）","     * 3. 找到合适的位置插入当前元素（大的在前）","     * 4. 重复步骤1-3，直到所有元素都排序完成","     * ","     * 特色：","     * - 降序排列：大的元素排在前面","     * - break控制：使用break提前退出循环","     * - 条件反转：比较条件是 current \u003e arr[j]","     * ","     * 时间复杂度：平均O(n²)，最好O(n)，最坏O(n²)","     * 空间复杂度：O(1) - 原地排序","     * 稳定性：稳定 - 保持相等元素的相对位置","     */","    public static void insertSort5(int[] arr) {","        System.out.println(\"insertSort5 for loop descending:\");","        ","        // 第一步：从第一个元素开始遍历","        for (int i = 0; i \u003c arr.length; i++) {","            int current = arr[i];","            int j = i - 1;","            System.out.println(\"i=\" + i + \" j=\" + j + \" current=\" + current + \" arr[i]=\" + arr[i] + \" arr[j + 1]=\" + arr[j + 1] + \" arr[]=\" + Arrays.toString(arr));","            ","            // 第二步：当前项比已排序的内容要大，则逐个右移，空出位置","            for (; j \u003e= 0; j--) {","                if (current \u003e arr[j]) {","                    arr[j + 1] = arr[j];","                } else {","                    // 第三步：当小于已排序内容，则跳出循环","                    break;","                }","            }","            ","            // 第四步：将当前项插入到正确位置","            arr[j + 1] = current;","        }","        ","        printArray(arr, \"排序后数组\");","    }","","    // ==================== 算法测试和性能对比 ====================","    ","    @FunctionalInterface","    private interface SortFunction {","        void sort(int[] arr);","    }","","    public static void main(String[] args) {","        // 测试1：标准版本","        performanceTest(InsertSort::insertSort1, testData, \"标准版本\");","","        // 测试2：for循环升序版本","        performanceTest(InsertSort::insertSort2, testData, \"for循环升序版本\");","","        // 测试3：哨兵版本","        performanceTest(InsertSort::insertSort3, testData, \"哨兵版本\");","","        // 测试4：希尔插入版本","        performanceTest(InsertSort::insertSort4, testData, \"希尔插入版本\");","","        // 测试5：降序版本","        performanceTest(InsertSort::insertSort5, testData, \"降序版本\");","","        System.out.println(\"=== 算法对比总结 ===\");","        System.out.println(\"1. 标准版本：经典实现，易于理解\");","        System.out.println(\"2. for循环升序版本：for循环实现，逻辑清晰\");","        System.out.println(\"3. 哨兵版本：简化边界，提升性能\");","        System.out.println(\"4. 希尔插入版本：增量排序，混合优化\");","        System.out.println(\"5. 降序版本：降序排列，break控制\");","    }","}","","/*","打印结果","jarry@Mac insertsort % java InsertSort.java","标准版本原始数组: [7, 11, 9, 10, 12, 13, 8]","insertSort1 standard:","i=1 j=0 current=11 arr[i]=11 arr[j + 1]=11 arr[]=[7, 11, 9, 10, 12, 13, 8]","i=2 j=1 current=9 arr[i]=9 arr[j + 1]=9 arr[]=[7, 11, 9, 10, 12, 13, 8]","i=3 j=2 current=10 arr[i]=10 arr[j + 1]=10 arr[]=[7, 9, 11, 10, 12, 13, 8]","i=4 j=3 current=12 arr[i]=12 arr[j + 1]=12 arr[]=[7, 9, 10, 11, 12, 13, 8]","i=5 j=4 current=13 arr[i]=13 arr[j + 1]=13 arr[]=[7, 9, 10, 11, 12, 13, 8]","i=6 j=5 current=8 arr[i]=8 arr[j + 1]=8 arr[]=[7, 9, 10, 11, 12, 13, 8]","排序后数组: [7, 8, 9, 10, 11, 12, 13]","标准版本: 2.924ms","标准版本排序结果: [7, 8, 9, 10, 11, 12, 13]","","for循环升序版本原始数组: [7, 11, 9, 10, 12, 13, 8]","insertSort2 for loop ascending:","i=1 j=0 current=11 arr[i]=11 arr[j + 1]=11 arr[]=[7, 11, 9, 10, 12, 13, 8]","i=2 j=1 current=9 arr[i]=9 arr[j + 1]=9 arr[]=[7, 11, 9, 10, 12, 13, 8]","i=3 j=2 current=10 arr[i]=10 arr[j + 1]=10 arr[]=[7, 9, 11, 10, 12, 13, 8]","i=4 j=3 current=12 arr[i]=12 arr[j + 1]=12 arr[]=[7, 9, 10, 11, 12, 13, 8]","i=5 j=4 current=13 arr[i]=13 arr[j + 1]=13 arr[]=[7, 9, 10, 11, 12, 13, 8]","i=6 j=5 current=8 arr[i]=8 arr[j + 1]=8 arr[]=[7, 9, 10, 11, 12, 13, 8]","排序后数组: [7, 8, 9, 10, 11, 12, 13]","for循环升序版本: 0.190ms","for循环升序版本排序结果: [7, 8, 9, 10, 11, 12, 13]","","哨兵版本原始数组: [7, 11, 9, 10, 12, 13, 8]","insertSort3 sentinel:","排序后数组: [7, 8, 9, 10, 11, 12, 13]","哨兵版本: 0.021ms","哨兵版本排序结果: [7, 8, 9, 10, 11, 12, 13]","","希尔插入版本原始数组: [7, 11, 9, 10, 12, 13, 8]","insertSort4 shell insertion:","排序后数组: [7, 8, 9, 10, 11, 12, 13]","希尔插入版本: 0.025ms","希尔插入版本排序结果: [7, 8, 9, 10, 11, 12, 13]","","降序版本原始数组: [7, 11, 9, 10, 12, 13, 8]","insertSort5 for loop descending:","i=0 j=-1 current=7 arr[i]=7 arr[j + 1]=7 arr[]=[7, 11, 9, 10, 12, 13, 8]","i=1 j=0 current=11 arr[i]=11 arr[j + 1]=11 arr[]=[7, 11, 9, 10, 12, 13, 8]","i=2 j=1 current=9 arr[i]=9 arr[j + 1]=9 arr[]=[11, 7, 9, 10, 12, 13, 8]","i=3 j=2 current=10 arr[i]=10 arr[j + 1]=10 arr[]=[11, 9, 7, 10, 12, 13, 8]","i=4 j=3 current=12 arr[i]=12 arr[j + 1]=12 arr[]=[11, 10, 9, 7, 12, 13, 8]","i=5 j=4 current=13 arr[i]=13 arr[j + 1]=13 arr[]=[12, 11, 10, 9, 7, 13, 8]","i=6 j=5 current=8 arr[i]=8 arr[j + 1]=8 arr[]=[13, 12, 11, 10, 9, 7, 8]","排序后数组: [13, 12, 11, 10, 9, 8, 7]","降序版本: 0.193ms","降序版本排序结果: [13, 12, 11, 10, 9, 8, 7]","","=== 算法对比总结 ===","1. 标准版本：经典实现，易于理解","2. for循环升序版本：for循环实现，逻辑清晰","3. 哨兵版本：简化边界，提升性能","4. 希尔插入版本：增量排序，混合优化","5. 降序版本：降序排列，break控制","*/"],"stylingDirectives":[[[0,3,"pl-c"]],[[0,64,"pl-c"]],[[0,3,"pl-c"]],[[0,29,"pl-c"]],[[0,16,"pl-c"]],[[0,3,"pl-c"]],[],[[0,3,"pl-c"]],[[0,11,"pl-c"]],[[0,26,"pl-c"]],[[0,3,"pl-c"]],[],[[0,6,"pl-k"],[7,11,"pl-s1"],[12,16,"pl-s1"],[17,23,"pl-s1"]],[],[[0,6,"pl-k"],[7,12,"pl-k"],[13,23,"pl-smi"]],[],[[4,7,"pl-c"]],[[0,18,"pl-c"]],[[0,7,"pl-c"]],[[4,11,"pl-k"],[12,18,"pl-k"],[19,23,"pl-smi"],[24,34,"pl-en"],[35,38,"pl-smi"],[41,44,"pl-s1"],[46,52,"pl-smi"],[53,58,"pl-s1"]],[[8,14,"pl-smi"],[15,18,"pl-s1"],[19,26,"pl-en"],[27,32,"pl-s1"],[35,39,"pl-s"],[42,48,"pl-smi"],[49,57,"pl-en"],[58,61,"pl-s1"]],[],[],[[4,7,"pl-c"]],[[0,15,"pl-c"]],[[0,7,"pl-c"]],[[4,11,"pl-k"],[12,18,"pl-k"],[19,23,"pl-smi"],[24,39,"pl-en"],[40,52,"pl-smi"],[53,61,"pl-s1"],[63,66,"pl-smi"],[69,72,"pl-s1"],[74,80,"pl-smi"],[81,85,"pl-s1"]],[[8,25,"pl-c"]],[[8,11,"pl-smi"],[14,21,"pl-s1"],[24,30,"pl-smi"],[31,37,"pl-en"],[38,41,"pl-s1"],[43,46,"pl-s1"],[47,53,"pl-s1"]],[[8,18,"pl-en"],[19,26,"pl-s1"],[28,32,"pl-s1"],[35,41,"pl-s"]],[],[[8,15,"pl-c"]],[[8,12,"pl-smi"],[13,22,"pl-s1"],[25,31,"pl-smi"],[32,40,"pl-en"]],[[8,16,"pl-s1"],[17,21,"pl-en"],[22,29,"pl-s1"]],[[8,12,"pl-smi"],[13,20,"pl-s1"],[23,29,"pl-smi"],[30,38,"pl-en"]],[],[[8,14,"pl-smi"],[15,18,"pl-s1"],[19,26,"pl-en"],[27,31,"pl-s1"],[34,38,"pl-s"],[41,47,"pl-smi"],[48,54,"pl-en"],[55,61,"pl-s"],[64,71,"pl-s1"],[74,83,"pl-s1"],[87,98,"pl-c1"],[102,106,"pl-s"]],[[8,18,"pl-en"],[19,26,"pl-s1"],[28,32,"pl-s1"],[35,41,"pl-s"]],[[8,14,"pl-smi"],[15,18,"pl-s1"],[19,26,"pl-en"],[30,37,"pl-c"]],[],[],[[4,62,"pl-c"]],[],[[4,12,"pl-c"]],[[4,11,"pl-k"],[12,18,"pl-k"],[19,24,"pl-k"],[25,28,"pl-smi"],[31,39,"pl-s1"],[43,44,"pl-c1"],[46,48,"pl-c1"],[50,51,"pl-c1"],[53,55,"pl-c1"],[57,59,"pl-c1"],[61,63,"pl-c1"],[65,66,"pl-c1"]],[],[[4,7,"pl-c"]],[[0,22,"pl-c"]],[[0,7,"pl-c"]],[[0,12,"pl-c"]],[[0,29,"pl-c"]],[[0,26,"pl-c"]],[[0,23,"pl-c"]],[[0,29,"pl-c"]],[[0,7,"pl-c"]],[[0,23,"pl-c"]],[[0,30,"pl-c"]],[[0,7,"pl-c"]],[[0,35,"pl-c"]],[[0,24,"pl-c"]],[[0,27,"pl-c"]],[[0,7,"pl-c"]],[[4,10,"pl-k"],[11,17,"pl-k"],[18,22,"pl-smi"],[23,34,"pl-en"],[35,38,"pl-smi"],[41,44,"pl-s1"]],[[8,14,"pl-smi"],[15,18,"pl-s1"],[19,26,"pl-en"],[27,50,"pl-s"]],[],[[8,25,"pl-c"]],[[8,11,"pl-k"],[13,16,"pl-smi"],[17,18,"pl-s1"],[21,22,"pl-c1"],[24,25,"pl-s1"],[28,31,"pl-s1"],[32,38,"pl-s1"],[40,41,"pl-s1"]],[[12,15,"pl-smi"],[16,17,"pl-s1"],[20,21,"pl-s1"],[24,25,"pl-c1"]],[[12,23,"pl-c"]],[[12,15,"pl-smi"],[16,23,"pl-s1"],[26,29,"pl-s1"],[30,31,"pl-s1"]],[[12,18,"pl-smi"],[19,22,"pl-s1"],[23,30,"pl-en"],[31,35,"pl-s"],[38,39,"pl-s1"],[42,47,"pl-s"],[50,51,"pl-s1"],[54,65,"pl-s"],[68,75,"pl-s1"],[78,88,"pl-s"],[91,94,"pl-s1"],[95,96,"pl-s1"],[100,114,"pl-s"],[117,120,"pl-s1"],[121,122,"pl-s1"],[125,126,"pl-c1"],[130,139,"pl-s"],[142,148,"pl-smi"],[149,157,"pl-en"],[158,161,"pl-s1"]],[],[[12,34,"pl-c"]],[[12,17,"pl-k"],[19,20,"pl-s1"],[24,25,"pl-c1"],[29,36,"pl-s1"],[39,42,"pl-s1"],[43,44,"pl-s1"]],[[16,34,"pl-c"]],[[16,39,"pl-c"]],[[16,19,"pl-s1"],[20,21,"pl-s1"],[24,25,"pl-c1"],[29,32,"pl-s1"],[33,34,"pl-s1"]],[[16,17,"pl-s1"]],[],[],[[12,31,"pl-c"]],[[12,15,"pl-s1"],[16,17,"pl-s1"],[20,21,"pl-c1"],[25,32,"pl-s1"]],[],[],[[8,18,"pl-en"],[19,22,"pl-s1"],[24,31,"pl-s"]],[],[],[[4,7,"pl-c"]],[[0,26,"pl-c"]],[[0,7,"pl-c"]],[[0,12,"pl-c"]],[[0,26,"pl-c"]],[[0,21,"pl-c"]],[[0,7,"pl-c"]],[[0,12,"pl-c"]],[[0,30,"pl-c"]],[[0,21,"pl-c"]],[[0,7,"pl-c"]],[[0,41,"pl-c"]],[[0,24,"pl-c"]],[[0,13,"pl-c"]],[[0,7,"pl-c"]],[[4,10,"pl-k"],[11,17,"pl-k"],[18,22,"pl-smi"],[23,34,"pl-en"],[35,38,"pl-smi"],[41,44,"pl-s1"]],[[8,14,"pl-smi"],[15,18,"pl-s1"],[19,26,"pl-en"],[27,60,"pl-s"]],[],[[8,34,"pl-c"]],[[8,20,"pl-c"]],[[8,11,"pl-k"],[13,16,"pl-smi"],[17,18,"pl-s1"],[21,22,"pl-c1"],[24,25,"pl-s1"],[28,31,"pl-s1"],[32,38,"pl-s1"],[40,41,"pl-s1"]],[[12,15,"pl-smi"],[16,17,"pl-s1"],[20,21,"pl-s1"],[24,25,"pl-c1"]],[[12,15,"pl-smi"],[16,23,"pl-s1"],[26,29,"pl-s1"],[30,31,"pl-s1"]],[[12,18,"pl-smi"],[19,22,"pl-s1"],[23,30,"pl-en"],[31,35,"pl-s"],[38,39,"pl-s1"],[42,47,"pl-s"],[50,51,"pl-s1"],[54,65,"pl-s"],[68,75,"pl-s1"],[78,88,"pl-s"],[91,94,"pl-s1"],[95,96,"pl-s1"],[100,114,"pl-s"],[117,120,"pl-s1"],[121,122,"pl-s1"],[125,126,"pl-c1"],[130,139,"pl-s"],[142,148,"pl-smi"],[149,157,"pl-en"],[158,161,"pl-s1"]],[],[[12,50,"pl-c"]],[[12,15,"pl-k"],[19,20,"pl-s1"],[24,25,"pl-c1"],[29,36,"pl-s1"],[39,42,"pl-s1"],[43,44,"pl-s1"],[47,48,"pl-s1"]],[[16,19,"pl-s1"],[20,21,"pl-s1"],[24,25,"pl-c1"],[29,32,"pl-s1"],[33,34,"pl-s1"]],[],[],[[12,30,"pl-c"]],[[12,15,"pl-s1"],[16,17,"pl-s1"],[20,21,"pl-c1"],[25,32,"pl-s1"]],[],[],[[8,18,"pl-en"],[19,22,"pl-s1"],[24,31,"pl-s"]],[],[],[[4,7,"pl-c"]],[[0,18,"pl-c"]],[[0,7,"pl-c"]],[[0,12,"pl-c"]],[[0,25,"pl-c"]],[[0,17,"pl-c"]],[[0,7,"pl-c"]],[[0,12,"pl-c"]],[[0,15,"pl-c"]],[[0,15,"pl-c"]],[[0,16,"pl-c"]],[[0,7,"pl-c"]],[[0,35,"pl-c"]],[[0,30,"pl-c"]],[[0,13,"pl-c"]],[[0,7,"pl-c"]],[[4,10,"pl-k"],[11,17,"pl-k"],[18,22,"pl-smi"],[23,34,"pl-en"],[35,38,"pl-smi"],[41,44,"pl-s1"]],[[8,14,"pl-smi"],[15,18,"pl-s1"],[19,26,"pl-en"],[27,50,"pl-s"]],[],[[8,10,"pl-k"],[12,15,"pl-s1"],[16,22,"pl-s1"],[26,27,"pl-c1"],[29,35,"pl-k"]],[],[[8,24,"pl-c"]],[[8,11,"pl-smi"],[12,20,"pl-s1"],[23,24,"pl-c1"]],[[8,11,"pl-k"],[13,16,"pl-smi"],[17,18,"pl-s1"],[21,22,"pl-c1"],[24,25,"pl-s1"],[28,31,"pl-s1"],[32,38,"pl-s1"],[40,41,"pl-s1"]],[[12,14,"pl-k"],[16,19,"pl-s1"],[20,21,"pl-s1"],[25,28,"pl-s1"],[29,37,"pl-s1"]],[[16,24,"pl-s1"],[27,28,"pl-s1"]],[],[],[],[[8,27,"pl-c"]],[[8,10,"pl-k"],[12,20,"pl-s1"],[24,25,"pl-c1"]],[[12,15,"pl-smi"],[16,20,"pl-s1"],[23,26,"pl-s1"],[27,28,"pl-c1"]],[[12,15,"pl-s1"],[16,17,"pl-c1"],[21,24,"pl-s1"],[25,33,"pl-s1"]],[[12,15,"pl-s1"],[16,24,"pl-s1"],[28,32,"pl-s1"]],[],[],[[8,41,"pl-c"]],[[8,11,"pl-k"],[13,16,"pl-smi"],[17,18,"pl-s1"],[21,22,"pl-c1"],[24,25,"pl-s1"],[28,31,"pl-s1"],[32,38,"pl-s1"],[40,41,"pl-s1"]],[[12,15,"pl-smi"],[16,23,"pl-s1"],[26,29,"pl-s1"],[30,31,"pl-s1"]],[[12,15,"pl-smi"],[16,17,"pl-s1"],[20,21,"pl-s1"]],[],[[12,37,"pl-c"]],[[12,17,"pl-k"],[19,22,"pl-s1"],[23,24,"pl-s1"],[27,28,"pl-c1"],[32,39,"pl-s1"]],[[16,19,"pl-s1"],[20,21,"pl-s1"],[25,28,"pl-s1"],[29,30,"pl-s1"],[33,34,"pl-c1"]],[[16,17,"pl-s1"]],[],[],[[12,15,"pl-s1"],[16,17,"pl-s1"],[21,28,"pl-s1"]],[],[],[[8,18,"pl-en"],[19,22,"pl-s1"],[24,31,"pl-s"]],[],[],[[4,7,"pl-c"]],[[0,20,"pl-c"]],[[0,7,"pl-c"]],[[0,12,"pl-c"]],[[0,18,"pl-c"]],[[0,22,"pl-c"]],[[0,7,"pl-c"]],[[0,12,"pl-c"]],[[0,18,"pl-c"]],[[0,17,"pl-c"]],[[0,18,"pl-c"]],[[0,7,"pl-c"]],[[0,31,"pl-c"]],[[0,24,"pl-c"]],[[0,28,"pl-c"]],[[0,7,"pl-c"]],[[4,10,"pl-k"],[11,17,"pl-k"],[18,22,"pl-smi"],[23,34,"pl-en"],[35,38,"pl-smi"],[41,44,"pl-s1"]],[[8,14,"pl-smi"],[15,18,"pl-s1"],[19,26,"pl-en"],[27,57,"pl-s"]],[],[[8,11,"pl-smi"],[12,13,"pl-s1"],[16,19,"pl-s1"],[20,26,"pl-s1"]],[],[[8,23,"pl-c"]],[[8,11,"pl-k"],[13,16,"pl-smi"],[17,20,"pl-s1"],[23,24,"pl-s1"],[27,28,"pl-c1"],[30,33,"pl-s1"],[36,37,"pl-c1"],[39,42,"pl-s1"],[46,47,"pl-c1"]],[[12,30,"pl-c"]],[[12,15,"pl-k"],[17,20,"pl-smi"],[21,22,"pl-s1"],[25,28,"pl-s1"],[30,31,"pl-s1"],[34,35,"pl-s1"],[37,38,"pl-s1"]],[[16,19,"pl-smi"],[20,27,"pl-s1"],[30,33,"pl-s1"],[34,35,"pl-s1"]],[[16,19,"pl-smi"],[20,21,"pl-s1"],[24,25,"pl-s1"]],[],[[16,36,"pl-c"]],[[16,21,"pl-k"],[23,24,"pl-s1"],[28,31,"pl-s1"],[35,38,"pl-s1"],[39,40,"pl-s1"],[43,46,"pl-s1"],[50,57,"pl-s1"]],[[20,23,"pl-s1"],[24,25,"pl-s1"],[29,32,"pl-s1"],[33,34,"pl-s1"],[37,40,"pl-s1"]],[[20,21,"pl-s1"],[25,28,"pl-s1"]],[],[],[[16,29,"pl-c"]],[[16,19,"pl-s1"],[20,21,"pl-s1"],[25,32,"pl-s1"]],[],[],[],[[8,18,"pl-en"],[19,22,"pl-s1"],[24,31,"pl-s"]],[],[],[[4,7,"pl-c"]],[[0,15,"pl-c"]],[[0,7,"pl-c"]],[[0,12,"pl-c"]],[[0,29,"pl-c"]],[[0,30,"pl-c"]],[[0,29,"pl-c"]],[[0,29,"pl-c"]],[[0,7,"pl-c"]],[[0,10,"pl-c"]],[[0,22,"pl-c"]],[[0,30,"pl-c"]],[[0,36,"pl-c"]],[[0,7,"pl-c"]],[[0,35,"pl-c"]],[[0,24,"pl-c"]],[[0,27,"pl-c"]],[[0,7,"pl-c"]],[[4,10,"pl-k"],[11,17,"pl-k"],[18,22,"pl-smi"],[23,34,"pl-en"],[35,38,"pl-smi"],[41,44,"pl-s1"]],[[8,14,"pl-smi"],[15,18,"pl-s1"],[19,26,"pl-en"],[27,61,"pl-s"]],[],[[8,25,"pl-c"]],[[8,11,"pl-k"],[13,16,"pl-smi"],[17,18,"pl-s1"],[21,22,"pl-c1"],[24,25,"pl-s1"],[28,31,"pl-s1"],[32,38,"pl-s1"],[40,41,"pl-s1"]],[[12,15,"pl-smi"],[16,23,"pl-s1"],[26,29,"pl-s1"],[30,31,"pl-s1"]],[[12,15,"pl-smi"],[16,17,"pl-s1"],[20,21,"pl-s1"],[24,25,"pl-c1"]],[[12,18,"pl-smi"],[19,22,"pl-s1"],[23,30,"pl-en"],[31,35,"pl-s"],[38,39,"pl-s1"],[42,47,"pl-s"],[50,51,"pl-s1"],[54,65,"pl-s"],[68,75,"pl-s1"],[78,88,"pl-s"],[91,94,"pl-s1"],[95,96,"pl-s1"],[100,114,"pl-s"],[117,120,"pl-s1"],[121,122,"pl-s1"],[125,126,"pl-c1"],[130,139,"pl-s"],[142,148,"pl-smi"],[149,157,"pl-en"],[158,161,"pl-s1"]],[],[[12,42,"pl-c"]],[[12,15,"pl-k"],[19,20,"pl-s1"],[24,25,"pl-c1"],[27,28,"pl-s1"]],[[16,18,"pl-k"],[20,27,"pl-s1"],[30,33,"pl-s1"],[34,35,"pl-s1"]],[[20,23,"pl-s1"],[24,25,"pl-s1"],[28,29,"pl-c1"],[33,36,"pl-s1"],[37,38,"pl-s1"]],[[18,22,"pl-k"]],[[20,41,"pl-c"]],[[20,25,"pl-k"]],[],[],[],[[12,30,"pl-c"]],[[12,15,"pl-s1"],[16,17,"pl-s1"],[20,21,"pl-c1"],[25,32,"pl-s1"]],[],[],[[8,18,"pl-en"],[19,22,"pl-s1"],[24,31,"pl-s"]],[],[],[[4,58,"pl-c"]],[],[[4,5,"pl-c1"],[5,24,"pl-c1"]],[[4,11,"pl-k"],[12,21,"pl-k"],[22,34,"pl-smi"]],[[8,12,"pl-smi"],[13,17,"pl-en"],[18,21,"pl-smi"],[24,27,"pl-s1"]],[],[],[[4,10,"pl-k"],[11,17,"pl-k"],[18,22,"pl-smi"],[23,27,"pl-en"],[28,34,"pl-smi"],[37,41,"pl-s1"]],[[8,19,"pl-c"]],[[8,23,"pl-en"],[24,34,"pl-smi"],[36,47,"pl-s1"],[49,57,"pl-s1"],[59,65,"pl-s"]],[],[[8,24,"pl-c"]],[[8,23,"pl-en"],[24,34,"pl-smi"],[36,47,"pl-s1"],[49,57,"pl-s1"],[59,70,"pl-s"]],[],[[8,19,"pl-c"]],[[8,23,"pl-en"],[24,34,"pl-smi"],[36,47,"pl-s1"],[49,57,"pl-s1"],[59,65,"pl-s"]],[],[[8,21,"pl-c"]],[[8,23,"pl-en"],[24,34,"pl-smi"],[36,47,"pl-s1"],[49,57,"pl-s1"],[59,67,"pl-s"]],[],[[8,19,"pl-c"]],[[8,23,"pl-en"],[24,34,"pl-smi"],[36,47,"pl-s1"],[49,57,"pl-s1"],[59,65,"pl-s"]],[],[[8,14,"pl-smi"],[15,18,"pl-s1"],[19,26,"pl-en"],[27,43,"pl-s"]],[[8,14,"pl-smi"],[15,18,"pl-s1"],[19,26,"pl-en"],[27,46,"pl-s"]],[[8,14,"pl-smi"],[15,18,"pl-s1"],[19,26,"pl-en"],[27,54,"pl-s"]],[[8,14,"pl-smi"],[15,18,"pl-s1"],[19,26,"pl-en"],[27,46,"pl-s"]],[[8,14,"pl-smi"],[15,18,"pl-s1"],[19,26,"pl-en"],[27,48,"pl-s"]],[[8,14,"pl-smi"],[15,18,"pl-s1"],[19,26,"pl-en"],[27,49,"pl-s"]],[],[],[],[[0,2,"pl-c"]],[[0,4,"pl-c"]],[[0,43,"pl-c"]],[[0,35,"pl-c"]],[[0,21,"pl-c"]],[[0,74,"pl-c"]],[[0,71,"pl-c"]],[[0,74,"pl-c"]],[[0,74,"pl-c"]],[[0,74,"pl-c"]],[[0,71,"pl-c"]],[[0,32,"pl-c"]],[[0,13,"pl-c"]],[[0,35,"pl-c"]],[[0,0,"pl-c"]],[[0,40,"pl-c"]],[[0,31,"pl-c"]],[[0,74,"pl-c"]],[[0,71,"pl-c"]],[[0,74,"pl-c"]],[[0,74,"pl-c"]],[[0,74,"pl-c"]],[[0,71,"pl-c"]],[[0,32,"pl-c"]],[[0,18,"pl-c"]],[[0,40,"pl-c"]],[[0,0,"pl-c"]],[[0,35,"pl-c"]],[[0,21,"pl-c"]],[[0,32,"pl-c"]],[[0,13,"pl-c"]],[[0,35,"pl-c"]],[[0,0,"pl-c"]],[[0,37,"pl-c"]],[[0,28,"pl-c"]],[[0,32,"pl-c"]],[[0,15,"pl-c"]],[[0,37,"pl-c"]],[[0,0,"pl-c"]],[[0,35,"pl-c"]],[[0,32,"pl-c"]],[[0,72,"pl-c"]],[[0,74,"pl-c"]],[[0,71,"pl-c"]],[[0,74,"pl-c"]],[[0,74,"pl-c"]],[[0,74,"pl-c"]],[[0,71,"pl-c"]],[[0,32,"pl-c"]],[[0,13,"pl-c"]],[[0,35,"pl-c"]],[[0,0,"pl-c"]],[[0,14,"pl-c"]],[[0,17,"pl-c"]],[[0,25,"pl-c"]],[[0,17,"pl-c"]],[[0,19,"pl-c"]],[[0,20,"pl-c"]],[[0,2,"pl-c"]]],"colorizedLines":null}},"title":"algorithms/sorting/insertsort/InsertSort.java at main · microwind/algorithms","appPayload":{},"meta":{"title":"algorithms/sorting/insertsort/InsertSort.java at main · microwind/algorithms"}}</script>
  <div data-target="react-app.reactRoot"><meta name="github-code-view-meta-stats" id="github-code-view-meta-stats" data-hydrostats="publish"/> <!-- --> <a hidden="" id="code-view-repo-link" href="/microwind/algorithms" data-discover="true"></a> <div class="d-none"></div><div><div style="--spacing:var(--spacing-none)" class="prc-PageLayout-PageLayoutRoot--KH-d" data-component="SplitPageLayout" data-has-sidebar="true"><div class="prc-PageLayout-SidebarWrapper-kLG4B CopilotSidePanelSidebar-module__SidePanel__L3O0C CopilotSidePanelSidebar-module__HiddenSidePanel__TBRGn" style="--spacing-column:var(--spacing-none)" data-is-hidden="false" data-position="end" data-sticky="true" data-responsive-variant="fullscreen"><div class="prc-PageLayout-VerticalDivider-9QRmK prc-PageLayout-SidebarVerticalDivider-0Rl0V" data-component="PageLayout.VerticalDivider" data-variant="line" data-position="end" style="--spacing:var(--spacing-none)"><div class="prc-PageLayout-DraggableHandle-9s6B4" data-component="PageLayout.DragHandle" role="slider" aria-label="Draggable pane splitter" aria-valuemin="450" aria-valuemax="768" aria-valuenow="544" aria-valuetext="Pane width 544 pixels" tabindex="0"></div></div><div class="prc-PageLayout-Sidebar-iciWg" data-component="SplitPageLayout.Sidebar" data-resizable="true" style="--spacing:var(--spacing-normal);--pane-min-width:450px;--pane-max-width:768px;--pane-width-custom:544px;--pane-width-size:var(--pane-width-custom);--pane-width:544px"><div class="height-full" data-testid="copilot-code-view-side-panel"><div id="copilot-side-panel-content" class="height-full"></div></div></div></div><div class="prc-PageLayout-PageLayoutWrapper-2BhU2" data-width="full"><div class="prc-PageLayout-PageLayoutContent-BneH9"><div id="repos-file-tree-sidebar" class="CodeViewFileTreeLayout-module__sidebar__n_Aau" tabindex="0"><div class="prc-PageLayout-PaneWrapper-pHPop ReposFileTreePane-module__Pane__rBZpI ReposFileTreePane-module__HideTree__AYZnm ReposFileTreePane-module__HidePane__VHAVt" style="--offset-header:0px;--spacing-row:var(--spacing-none);--spacing-column:var(--spacing-none)" data-is-hidden="false" data-position="start" data-sticky="true"><div class="prc-PageLayout-HorizontalDivider-JLVqp prc-PageLayout-PaneHorizontalDivider-9tbnE" data-component="PageLayout.HorizontalDivider" data-variant-regular="none" data-variant-narrow="none" data-position="start" style="--spacing-divider:var(--spacing-none);--spacing:var(--spacing-none)"></div><div class="prc-PageLayout-Pane-AyzHK" data-component="SplitPageLayout.Pane" data-resizable="true" style="--spacing:var(--spacing-none);--pane-min-width:256px;--pane-max-width:calc(100vw - var(--pane-max-width-diff));--pane-width-size:var(--pane-width-large);--pane-width:320px"></div><div class="prc-PageLayout-VerticalDivider-9QRmK prc-PageLayout-PaneVerticalDivider-le57g" data-component="PageLayout.VerticalDivider" data-variant-narrow="none" data-variant-regular="line" data-variant-wide="line" data-position="start" style="--spacing:var(--spacing-none)"><div class="prc-PageLayout-DraggableHandle-9s6B4" data-component="PageLayout.DragHandle" role="slider" aria-label="Draggable pane splitter" aria-valuemin="256" aria-valuemax="600" aria-valuenow="320" aria-valuetext="Pane width 320 pixels" tabindex="0"></div></div></div></div><div data-component="SplitPageLayout.Content" class="prc-PageLayout-ContentWrapper-gR9eG"><div class="prc-PageLayout-Content-xWL-A" data-width="full" style="--spacing:var(--spacing-none)"><div class="SharedPageLayout-module__content__IwGAp" data-selector="repos-split-pane-content" id="repos-split-pane-content" tabindex="0"> <!-- --> <div class="container CodeViewHeader-module__Box__JkPOb"><div class="CodeViewHeader-module__StickyHeader__Qn7UN" id="StickyHeader"><div class="CodeViewHeader-module__Box_1__SbNDV"><div class="CodeViewHeader-module__Box_2__TB46f"><div class="react-code-view-header-wrap--narrow CodeViewHeader-module__Box_3__q1zUL"><div class="CodeViewHeader-module__treeToggleWrapper__RQ__9"><h2 class="use-tree-pane-module__Heading__s4QbZ prc-Heading-Heading-MtWFE" data-component="Heading"><button data-component="Button" type="button" aria-label="Expand file tree" data-testid="expand-file-tree-button-mobile" class="prc-Button-ButtonBase-9n-Xk ExpandFileTreeButton-module__Button_1__Svs95" data-loading="false" data-size="medium" data-variant="invisible"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5"><span data-component="leadingVisual" class="prc-Button-Visual-YNt2F prc-Button-LeadingVisual-UySKu prc-Button-VisualWrap-E4cnq"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-arrow-left" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M7.78 12.53a.75.75 0 0 1-1.06 0L2.47 8.28a.75.75 0 0 1 0-1.06l4.25-4.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L4.81 7h7.44a.75.75 0 0 1 0 1.5H4.81l2.97 2.97a.75.75 0 0 1 0 1.06Z"></path></svg></span><span data-component="text" class="prc-Button-Label-FWkx3">Files</span></span></button><button data-component="IconButton" type="button" data-testid="expand-file-tree-button" aria-controls="repos-file-tree" class="prc-Button-ButtonBase-9n-Xk position-relative ExpandFileTreeButton-module__expandButton__hDOcv ExpandFileTreeButton-module__filesButtonBreakpoint__zEvz3 fgColor-muted prc-Button-IconButton-fyge7" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="invisible" aria-labelledby="_R_4lla9lik5_"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-sidebar-collapse" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M6.823 7.823a.25.25 0 0 1 0 .354l-2.396 2.396A.25.25 0 0 1 4 10.396V5.604a.25.25 0 0 1 .427-.177Z"></path><path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25H9.5v-13H1.75a.25.25 0 0 0-.25.25ZM11 14.5h3.25a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H11Z"></path></svg></button><span class="prc-TooltipV2-Tooltip-tLeuB" data-direction="se" data-component="Tooltip" aria-hidden="true" id="_R_4lla9lik5_">Expand file tree</span><div class="d-none"></div></h2></div><div class="react-code-view-header-mb--narrow mr-2"><button data-component="Button" type="button" aria-haspopup="true" aria-expanded="false" tabindex="0" aria-label="main branch" data-testid="anchor-button" data-icv-name="Switch branches/tags" class="prc-Button-ButtonBase-9n-Xk ref-selector-class RefSelectorAnchoredOverlay-module__RefSelectorOverlayBtn__a3WK3" data-loading="false" data-size="medium" data-variant="default" id="ref-picker-repos-header-ref-selector-wide"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5"><span data-component="leadingVisual" class="prc-Button-Visual-YNt2F prc-Button-LeadingVisual-UySKu prc-Button-VisualWrap-E4cnq"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-git-branch" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg></span><span data-component="text" class="prc-Button-Label-FWkx3"><div class="RefSelectorAnchoredOverlay-module__RefSelectorOverlayContainer__yaf4p"><div style="max-width:125px" class="ref-selector-button-text-container RefSelectorAnchoredOverlay-module__RefSelectorBtnTextContainer__Di3rk"><span class="RefSelectorAnchoredOverlay-module__RefSelectorText__w_fmP">main</span></div></div></span><span data-component="trailingVisual" class="prc-Button-Visual-YNt2F prc-Button-VisualWrap-E4cnq"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-triangle-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></span></span></button><div class="d-none"></div></div><div class="react-code-view-header-mb--narrow CodeViewHeader-module__Box_5__MQ0hL"><div class="Breadcrumb-module__container__Vxvev Breadcrumb-module__lg__Rjz0A"><nav data-testid="breadcrumbs" aria-labelledby="repos-header-breadcrumb-heading" id="repos-header-breadcrumb" class="Breadcrumb-module__nav__rQFDj"><h2 class="sr-only ScreenReaderHeading-module__userSelectNone__rwWIk prc-Heading-Heading-MtWFE" data-component="Heading" data-testid="screen-reader-heading" id="repos-header-breadcrumb-heading">Breadcrumbs</h2><ol class="Breadcrumb-module__list__ZH6zr"><li class="Breadcrumb-module__listItem__Ib0x_"><a class="Breadcrumb-module__repoLink__O2Nbs prc-Link-Link-9ZwDx" data-component="Link" data-testid="breadcrumbs-repo-link" href="/microwind/algorithms/tree/main" data-discover="true">algorithms</a></li><li class="Breadcrumb-module__listItem__Ib0x_"><span class="Breadcrumb-module__separator__eNwsI Breadcrumb-module__lg__Rjz0A" aria-hidden="true">/</span><a class="Breadcrumb-module__directoryLink__kQy_t prc-Link-Link-9ZwDx" data-component="Link" href="/microwind/algorithms/tree/main/sorting" data-discover="true">sorting</a></li><li class="Breadcrumb-module__listItem__Ib0x_"><span class="Breadcrumb-module__separator__eNwsI Breadcrumb-module__lg__Rjz0A" aria-hidden="true">/</span><a class="Breadcrumb-module__directoryLink__kQy_t prc-Link-Link-9ZwDx" data-component="Link" href="/microwind/algorithms/tree/main/sorting/insertsort" data-discover="true">insertsort</a></li></ol></nav><div data-testid="breadcrumbs-filename" class="Breadcrumb-module__filename__equZR"><span class="Breadcrumb-module__separator__eNwsI Breadcrumb-module__lg__Rjz0A" aria-hidden="true">/</span><h1 class="Breadcrumb-module__filenameHeading__MNMtw Breadcrumb-module__lg__Rjz0A prc-Heading-Heading-MtWFE" data-component="Heading" tabindex="-1" id="file-name-id">InsertSort.java</h1></div><button data-component="IconButton" type="button" class="prc-Button-ButtonBase-9n-Xk ml-2 prc-Button-IconButton-fyge7" data-loading="false" data-no-visuals="true" data-size="small" data-variant="invisible" aria-labelledby="_R_7lla9lik5_"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-copy" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg></button><span class="CopyToClipboardIconButton-module__tooltip__WyiwL prc-TooltipV2-Tooltip-tLeuB" data-direction="nw" data-component="Tooltip" aria-label="Copy path" aria-hidden="true" id="_R_7lla9lik5_">Copy path</span></div></div></div><div class="react-code-view-header-element--wide"><div class="CodeViewHeader-module__Box_7___0R6c"><div class="d-flex gap-2"><div><div class="CodeViewHeader-module__FileResultsList__JDzUy"><span class="d-flex FileResultsList-module__FilesSearchBox__ivVkc TextInput-wrapper prc-components-TextInputWrapper-Hpdqi prc-components-TextInputBaseWrapper-wY-n0" data-no-trailing-action="true" data-component="TextInput" data-leading-visual="true" data-trailing-visual="true" aria-busy="false"><span class="TextInput-icon" id="_R_1cpla9lik5_" aria-hidden="true" data-component="TextInput.LeadingVisual"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-search" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg></span><input type="text" aria-label="Go to file" role="combobox" aria-controls="file-results-list" aria-expanded="false" aria-haspopup="dialog" autoCorrect="off" spellCheck="false" placeholder="Go to file" aria-describedby="_R_1cpla9lik5_ _R_1cpla9lik5H1_" data-component="input" class="prc-components-Input-IwWrt" value=""/><span class="TextInput-icon" id="_R_1cpla9lik5H1_" aria-hidden="true" data-component="TextInput.TrailingVisual"></span></span></div><div class="d-none"></div></div><div class="d-none"></div><button data-component="Button" type="button" style="display:none" class="prc-Button-ButtonBase-9n-Xk NavigationMenu-module__Button__LpKgm" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="default"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5"><span data-component="text" class="prc-Button-Label-FWkx3">Blame</span></span></button><div class="d-none"></div><button data-component="IconButton" type="button" data-testid="more-file-actions-button-nav-menu-wide" aria-haspopup="true" aria-expanded="false" tabindex="0" class="prc-Button-ButtonBase-9n-Xk js-blob-dropdown-click NavigationMenu-module__IconButton__HpX3G prc-Button-IconButton-fyge7" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="default" aria-labelledby="_R_7p9la9lik5_" id="_R_99la9lik5_"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-kebab-horizontal" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg></button><span class="prc-TooltipV2-Tooltip-tLeuB" data-direction="nw" data-component="Tooltip" aria-hidden="true" id="_R_7p9la9lik5_">More file actions</span></div></div></div><div class="react-code-view-header-element--narrow"><div class="CodeViewHeader-module__Box_7___0R6c"><div class="d-flex gap-2"><div class="d-none"></div><button data-component="Button" type="button" style="display:none" class="prc-Button-ButtonBase-9n-Xk NavigationMenu-module__Button__LpKgm" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="default"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5"><span data-component="text" class="prc-Button-Label-FWkx3">Blame</span></span></button><div class="d-none"></div><button data-component="IconButton" type="button" data-testid="more-file-actions-button-nav-menu-narrow" aria-haspopup="true" aria-expanded="false" tabindex="0" class="prc-Button-ButtonBase-9n-Xk js-blob-dropdown-click NavigationMenu-module__IconButton__HpX3G prc-Button-IconButton-fyge7" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="default" aria-labelledby="_R_7pdla9lik5_" id="_R_9dla9lik5_"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-kebab-horizontal" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg></button><span class="prc-TooltipV2-Tooltip-tLeuB" data-direction="nw" data-component="Tooltip" aria-hidden="true" id="_R_7pdla9lik5_">More file actions</span></div></div></div></div></div></div></div><div class="CodeView-module__contentWrapper__cG2JH"><div class="react-code-view-bottom-padding"><div class="BlobTopBanners-module__Box__v_nvx"></div></div> <div class="d-none"></div><div class="d-flex flex-column border rounded-2 tmp-mb-3 pl-1"><div class="LatestCommit-module__Box__B25ZT"><h2 class="sr-only ScreenReaderHeading-module__userSelectNone__rwWIk prc-Heading-Heading-MtWFE" data-component="Heading" data-testid="screen-reader-heading">Latest commit</h2><div style="width:120px" class="Skeleton Skeleton--text" data-testid="loading"> </div><div class="d-flex flex-shrink-0 gap-2"><div data-testid="latest-commit-details" class="d-none d-sm-flex flex-items-center"></div><div class="d-flex gap-2"><h2 class="sr-only ScreenReaderHeading-module__userSelectNone__rwWIk prc-Heading-Heading-MtWFE" data-component="Heading" data-testid="screen-reader-heading">History</h2><a data-component="LinkButton" href="/microwind/algorithms/commits/main/sorting/insertsort/InsertSort.java" class="prc-Button-ButtonBase-9n-Xk d-none d-lg-flex LinkButton-module__linkButton__nFnov flex-items-center fgColor-default" data-loading="false" data-size="small" data-variant="invisible"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5"><span data-component="leadingVisual" class="prc-Button-Visual-YNt2F prc-Button-LeadingVisual-UySKu prc-Button-VisualWrap-E4cnq"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-history" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path></svg></span><span data-component="text" class="prc-Button-Label-FWkx3"><span class="fgColor-default">History</span></span></span></a><div class="d-sm-none"></div><div class="d-flex d-lg-none"><a data-component="LinkButton" aria-label="View commit history for this file." href="/microwind/algorithms/commits/main/sorting/insertsort/InsertSort.java" class="prc-Button-ButtonBase-9n-Xk LinkButton-module__linkButton__nFnov flex-items-center fgColor-default" data-loading="false" data-size="small" data-variant="invisible" aria-describedby="_R_4mlala9lik5_"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5"><span data-component="leadingVisual" class="prc-Button-Visual-YNt2F prc-Button-LeadingVisual-UySKu prc-Button-VisualWrap-E4cnq"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-history" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path></svg></span></span></a><span class="prc-TooltipV2-Tooltip-tLeuB" data-direction="s" data-component="Tooltip" role="tooltip" aria-hidden="true" id="_R_4mlala9lik5_">History</span></div></div></div></div></div><div class="d-flex flex-row"><div class="container BlobViewContent-module__blobContainer__DtH2d"><div class="react-code-size-details-banner BlobViewContent-module__codeSizeDetails__e5sUw"><div class="react-code-size-details-banner CodeSizeDetails-module__Box__VcD6l"><div class="text-mono CodeSizeDetails-module__Box_1__GVxQL"><div data-testid="blob-size" class="CodeSizeDetails-module__Truncate_1__lE93V prc-Truncate-Truncate-2G1eo" data-inline="true" title="12.8 KB" style="--truncate-max-width:100%"><span>354 lines (302 loc) · 12.8 KB</span></div></div></div></div><div class="react-blob-view-header-sticky BlobViewContent-module__stickyHeader__VwxB5" id="repos-sticky-header"><div class="BlobViewHeader-module__Box__yhm9u"><div class="react-blob-sticky-header"><div class="FileNameStickyHeader-module__outerWrapper__ZL4Xc FileNameStickyHeader-module__outerWrapperHidden__Zpynk"><div class="FileNameStickyHeader-module__Box_1__Hazu5"><div class="FileNameStickyHeader-module__Box_2__hoolP"><div class="FileNameStickyHeader-module__Box_3__MVKsk"><button data-component="Button" type="button" aria-haspopup="true" aria-expanded="false" tabindex="0" aria-label="main branch" data-testid="anchor-button" data-icv-name="Switch branches/tags" class="prc-Button-ButtonBase-9n-Xk ref-selector-class RefSelectorAnchoredOverlay-module__RefSelectorOverlayBtn__a3WK3" data-loading="false" data-size="medium" data-variant="default" id="ref-picker-repos-header-ref-selector"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5"><span data-component="leadingVisual" class="prc-Button-Visual-YNt2F prc-Button-LeadingVisual-UySKu prc-Button-VisualWrap-E4cnq"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-git-branch" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg></span><span data-component="text" class="prc-Button-Label-FWkx3"><div class="RefSelectorAnchoredOverlay-module__RefSelectorOverlayContainer__yaf4p"><div style="max-width:125px" class="ref-selector-button-text-container RefSelectorAnchoredOverlay-module__RefSelectorBtnTextContainer__Di3rk"><span class="RefSelectorAnchoredOverlay-module__RefSelectorText__w_fmP">main</span></div></div></span><span data-component="trailingVisual" class="prc-Button-Visual-YNt2F prc-Button-VisualWrap-E4cnq"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-triangle-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></span></span></button><div class="d-none"></div></div><div class="FileNameStickyHeader-module__Box_4__FLhtt"><div class="Breadcrumb-module__container__Vxvev Breadcrumb-module__md__Wb1Gs"><nav data-testid="breadcrumbs" aria-labelledby="sticky-breadcrumb-heading" id="sticky-breadcrumb" class="Breadcrumb-module__nav__rQFDj"><h2 class="sr-only ScreenReaderHeading-module__userSelectNone__rwWIk prc-Heading-Heading-MtWFE" data-component="Heading" data-testid="screen-reader-heading" id="sticky-breadcrumb-heading">Breadcrumbs</h2><ol class="Breadcrumb-module__list__ZH6zr"><li class="Breadcrumb-module__listItem__Ib0x_"><a class="Breadcrumb-module__repoLink__O2Nbs prc-Link-Link-9ZwDx" data-component="Link" data-testid="breadcrumbs-repo-link" href="/microwind/algorithms/tree/main" data-discover="true">algorithms</a></li><li class="Breadcrumb-module__listItem__Ib0x_"><span class="Breadcrumb-module__separator__eNwsI Breadcrumb-module__md__Wb1Gs" aria-hidden="true">/</span><a class="Breadcrumb-module__directoryLink__kQy_t prc-Link-Link-9ZwDx" data-component="Link" href="/microwind/algorithms/tree/main/sorting" data-discover="true">sorting</a></li><li class="Breadcrumb-module__listItem__Ib0x_"><span class="Breadcrumb-module__separator__eNwsI Breadcrumb-module__md__Wb1Gs" aria-hidden="true">/</span><a class="Breadcrumb-module__directoryLink__kQy_t prc-Link-Link-9ZwDx" data-component="Link" href="/microwind/algorithms/tree/main/sorting/insertsort" data-discover="true">insertsort</a></li></ol></nav><div data-testid="breadcrumbs-filename" class="Breadcrumb-module__filename__equZR"><span class="Breadcrumb-module__separator__eNwsI Breadcrumb-module__md__Wb1Gs" aria-hidden="true">/</span><h1 class="Breadcrumb-module__filenameHeading__MNMtw Breadcrumb-module__md__Wb1Gs prc-Heading-Heading-MtWFE" data-component="Heading" tabindex="-1" id="sticky-file-name-id">InsertSort.java</h1></div><button data-component="IconButton" type="button" class="prc-Button-ButtonBase-9n-Xk ml-2 prc-Button-IconButton-fyge7" data-loading="false" data-no-visuals="true" data-size="small" data-variant="invisible" aria-labelledby="_R_7lcpala9lik5_"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-copy" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg></button><span class="CopyToClipboardIconButton-module__tooltip__WyiwL prc-TooltipV2-Tooltip-tLeuB" data-direction="s" data-component="Tooltip" aria-label="Copy path" aria-hidden="true" id="_R_7lcpala9lik5_">Copy path</span></div></div></div><button data-component="Button" type="button" class="prc-Button-ButtonBase-9n-Xk FileNameStickyHeader-module__Button__LSEU_ FileNameStickyHeader-module__GoToTopButton__nxAFn" data-loading="false" data-size="small" data-variant="invisible"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5"><span data-component="leadingVisual" class="prc-Button-Visual-YNt2F prc-Button-LeadingVisual-UySKu prc-Button-VisualWrap-E4cnq"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-arrow-up" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path></svg></span><span data-component="text" class="prc-Button-Label-FWkx3">Top</span></span></button></div></div></div><div class="BlobViewHeader-module__Box_1__VEmuQ"><h2 class="sr-only ScreenReaderHeading-module__userSelectNone__rwWIk prc-Heading-Heading-MtWFE" data-component="Heading" data-testid="screen-reader-heading">File metadata and controls</h2><div class="BlobViewHeader-module__Box_2__icUs2"><ul aria-label="File view" class="prc-SegmentedControl-SegmentedControl-lqIXp BlobTabButtons-module__SegmentedControl__jen2u" data-variant="default" data-size="small" data-component="SegmentedControl"><li class="prc-SegmentedControl-Item-tSCQh" data-selected="" data-component="SegmentedControl.Button"><button aria-pressed="true" class="prc-SegmentedControl-Button-E48xz" type="button" style="--separator-color:transparent"><span class="prc-SegmentedControl-Content-1COlk segmentedControl-content"><div class="prc-SegmentedControl-Text-7S2y2 segmentedControl-text" data-text="Code">Code</div></span></button></li><li class="prc-SegmentedControl-Item-tSCQh" data-component="SegmentedControl.Button"><button aria-pressed="false" class="prc-SegmentedControl-Button-E48xz" type="button" style="--separator-color:var(--borderColor-default)"><span class="prc-SegmentedControl-Content-1COlk segmentedControl-content"><div class="prc-SegmentedControl-Text-7S2y2 segmentedControl-text" data-text="Blame">Blame</div></span></button></li></ul><div class="d-none"></div><div class="react-code-size-details-in-header CodeSizeDetails-module__Box__VcD6l"><div class="text-mono CodeSizeDetails-module__Box_1__GVxQL"><div data-testid="blob-size" class="CodeSizeDetails-module__Truncate_1__lE93V prc-Truncate-Truncate-2G1eo" data-inline="true" title="12.8 KB" style="--truncate-max-width:100%"><span>354 lines (302 loc) · 12.8 KB</span></div></div></div></div><div class="BlobViewHeader-module__Box_3__ng6v2"><div class="d-none"></div><div class="react-blob-header-edit-and-raw-actions BlobViewHeader-module__Box_4__J4Y4W"><div class="d-none"></div><div class="prc-ButtonGroup-ButtonGroup-vFUrY" data-component="ButtonGroup"><div class="prc-ButtonGroup-Item-PqvDl"><a data-component="LinkButton" href="https://github.com/microwind/algorithms/raw/refs/heads/main/sorting/insertsort/InsertSort.java" data-testid="raw-button" class="prc-Button-ButtonBase-9n-Xk LinkButton-module__linkButton__nFnov BlobViewHeader-module__LinkButton__X9kx2" data-loading="false" data-no-visuals="true" data-size="small" data-variant="default"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5"><span data-component="text" class="prc-Button-Label-FWkx3">Raw</span></span></a></div><div class="prc-ButtonGroup-Item-PqvDl"><button data-component="IconButton" type="button" data-testid="copy-raw-button" class="prc-Button-ButtonBase-9n-Xk prc-Button-IconButton-fyge7" data-loading="false" data-no-visuals="true" data-size="small" data-variant="default" aria-labelledby="_R_qaucpala9lik5_"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-copy" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg></button><span class="prc-TooltipV2-Tooltip-tLeuB" data-direction="n" data-component="Tooltip" aria-hidden="true" id="_R_qaucpala9lik5_">Copy raw file</span></div><div class="prc-ButtonGroup-Item-PqvDl"><button data-component="IconButton" type="button" data-testid="download-raw-button" class="prc-Button-ButtonBase-9n-Xk BlobViewHeader-module__downloadButton__ef459 prc-Button-IconButton-fyge7" data-loading="false" data-no-visuals="true" data-size="small" data-variant="default" aria-labelledby="_R_eaucpala9lik5_"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-download" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2.75 14A1.75 1.75 0 0 1 1 12.25v-2.5a.75.75 0 0 1 1.5 0v2.5c0 .138.112.25.25.25h10.5a.25.25 0 0 0 .25-.25v-2.5a.75.75 0 0 1 1.5 0v2.5A1.75 1.75 0 0 1 13.25 14Z"></path><path d="M7.25 7.689V2a.75.75 0 0 1 1.5 0v5.689l1.97-1.969a.749.749 0 1 1 1.06 1.06l-3.25 3.25a.749.749 0 0 1-1.06 0L4.22 6.78a.749.749 0 1 1 1.06-1.06l1.97 1.969Z"></path></svg></button><span class="prc-TooltipV2-Tooltip-tLeuB" data-direction="n" data-component="Tooltip" aria-hidden="true" id="_R_eaucpala9lik5_">Download raw file</span></div></div></div><div class="d-none"></div><button data-component="IconButton" type="button" aria-pressed="false" aria-expanded="false" aria-controls="symbols-pane" data-testid="symbols-button" class="prc-Button-ButtonBase-9n-Xk BlobViewHeader-module__IconButton_2__RyjZg prc-Button-IconButton-fyge7" data-loading="false" data-no-visuals="true" data-size="small" data-variant="invisible" aria-labelledby="_R_jecpala9lik5_" id="symbols-button"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-code-square" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25Zm7.47 3.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L10.69 8 9.22 6.53a.75.75 0 0 1 0-1.06ZM6.78 6.53 5.31 8l1.47 1.47a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg></button><span class="prc-TooltipV2-Tooltip-tLeuB" data-direction="nw" data-component="Tooltip" aria-hidden="true" id="_R_jecpala9lik5_">Open symbols panel</span><div class="react-blob-header-edit-and-raw-actions-combined"><button data-component="IconButton" type="button" title="More file actions" data-testid="more-file-actions-button" aria-haspopup="true" aria-expanded="false" tabindex="0" class="prc-Button-ButtonBase-9n-Xk js-blob-dropdown-click BlobViewHeader-module__IconButton__XrMQY prc-Button-IconButton-fyge7" data-loading="false" data-no-visuals="true" data-size="small" data-variant="invisible" aria-labelledby="_R_fkecpala9lik5_" id="_R_kecpala9lik5_"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-kebab-horizontal" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg></button><span class="prc-TooltipV2-Tooltip-tLeuB" data-direction="nw" data-component="Tooltip" aria-hidden="true" id="_R_fkecpala9lik5_">Edit and raw actions</span></div></div></div></div><div></div></div><div class="BlobViewContent-module__blobContentWrapper__JS0W6"><section aria-labelledby="file-name-id-wide file-name-id-mobile" class="BlobContent-module__blobContentSection__VOgZq" style="margin-top:46px"><!--$--><div class="CodeBlob-module__codeBlobWrapper__RS6In" style="padding-top:8px;padding-bottom:8px"><div id="highlighted-line-menu-positioner" class="position-relative"><div id="copilot-button-positioner" class="position-relative"><div class="CodeBlob-module__codeBlobInner__tfjuQ"><div class="react-code-file-contents CodeLinesSSR-module__codeFileContents__ARmAN" role="presentation" aria-hidden="true" data-tab-size="4" data-paste-markdown-skip="true" style="tab-size:4;max-width:unset" data-hpc="true" containertiming="hpc"><div class="react-line-numbers" style="pointer-events:auto"><div data-line-number="1" class="react-line-number react-code-text" style="padding-right:16px">1</div><div data-line-number="2" class="react-line-number react-code-text" style="padding-right:16px">2</div><div data-line-number="3" class="react-line-number react-code-text" style="padding-right:16px">3</div><div data-line-number="4" class="react-line-number react-code-text" style="padding-right:16px">4</div><div data-line-number="5" class="react-line-number react-code-text" style="padding-right:16px">5</div><div data-line-number="6" class="react-line-number react-code-text" style="padding-right:16px">6</div><div data-line-number="7" class="react-line-number react-code-text" style="padding-right:16px">7</div><div data-line-number="8" class="react-line-number react-code-text" style="padding-right:16px">8</div><div data-line-number="9" class="react-line-number react-code-text" style="padding-right:16px">9</div><div data-line-number="10" class="react-line-number react-code-text" style="padding-right:16px">10</div><div data-line-number="11" class="react-line-number react-code-text" style="padding-right:16px">11</div><div data-line-number="12" class="react-line-number react-code-text" style="padding-right:16px">12</div><div data-line-number="13" class="react-line-number react-code-text" style="padding-right:16px">13</div><div data-line-number="14" class="react-line-number react-code-text" style="padding-right:16px">14</div><div data-line-number="15" class="react-line-number react-code-text" style="padding-right:16px">15<span class="LineNumber-module__codeAlert__WexRo LineNumber-module__codeAlertRight__hdWmf"><button data-code-folding-chevron="true" type="button" aria-expanded="true" aria-label="Collapse code section" class="LineNumber-module__codeFoldingChevron__sY2Yt"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-chevron-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg></button></span></div><div data-line-number="16" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">16</div><div data-line-number="17" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">17</div><div data-line-number="18" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">18</div><div data-line-number="19" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">19</div><div data-line-number="20" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">20</div><div data-line-number="21" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">21</div><div data-line-number="22" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">22</div><div data-line-number="23" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">23</div><div data-line-number="24" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">24</div><div data-line-number="25" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">25</div><div data-line-number="26" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">26</div><div data-line-number="27" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">27<span class="LineNumber-module__codeAlert__WexRo LineNumber-module__codeAlertRight__hdWmf"><button data-code-folding-chevron="true" type="button" aria-expanded="true" aria-label="Collapse code section" class="LineNumber-module__codeFoldingChevron__sY2Yt"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-chevron-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg></button></span></div><div data-line-number="28" class="child-of-line-14 child-of-line-26  react-line-number react-code-text" style="padding-right:16px">28</div><div data-line-number="29" class="child-of-line-14 child-of-line-26  react-line-number react-code-text" style="padding-right:16px">29</div><div data-line-number="30" class="child-of-line-14 child-of-line-26  react-line-number react-code-text" style="padding-right:16px">30</div><div data-line-number="31" class="child-of-line-14 child-of-line-26  react-line-number react-code-text" style="padding-right:16px">31</div><div data-line-number="32" class="child-of-line-14 child-of-line-26  react-line-number react-code-text" style="padding-right:16px">32</div><div data-line-number="33" class="child-of-line-14 child-of-line-26  react-line-number react-code-text" style="padding-right:16px">33</div><div data-line-number="34" class="child-of-line-14 child-of-line-26  react-line-number react-code-text" style="padding-right:16px">34</div><div data-line-number="35" class="child-of-line-14 child-of-line-26  react-line-number react-code-text" style="padding-right:16px">35</div><div data-line-number="36" class="child-of-line-14 child-of-line-26  react-line-number react-code-text" style="padding-right:16px">36</div><div data-line-number="37" class="child-of-line-14 child-of-line-26  react-line-number react-code-text" style="padding-right:16px">37</div><div data-line-number="38" class="child-of-line-14 child-of-line-26  react-line-number react-code-text" style="padding-right:16px">38</div><div data-line-number="39" class="child-of-line-14 child-of-line-26  react-line-number react-code-text" style="padding-right:16px">39</div><div data-line-number="40" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">40</div><div data-line-number="41" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">41</div><div data-line-number="42" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">42</div><div data-line-number="43" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">43</div><div data-line-number="44" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">44</div><div data-line-number="45" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">45</div><div data-line-number="46" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">46</div><div data-line-number="47" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">47</div><div data-line-number="48" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">48</div><div data-line-number="49" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">49</div><div data-line-number="50" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">50</div><div data-line-number="51" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">51</div><div data-line-number="52" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">52</div><div data-line-number="53" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">53</div><div data-line-number="54" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">54</div><div data-line-number="55" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">55</div><div data-line-number="56" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">56</div><div data-line-number="57" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">57</div><div data-line-number="58" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">58</div><div data-line-number="59" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">59</div><div data-line-number="60" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">60</div><div data-line-number="61" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">61</div><div data-line-number="62" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">62</div><div data-line-number="63" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">63<span class="LineNumber-module__codeAlert__WexRo LineNumber-module__codeAlertRight__hdWmf"><button data-code-folding-chevron="true" type="button" aria-expanded="true" aria-label="Collapse code section" class="LineNumber-module__codeFoldingChevron__sY2Yt"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-chevron-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg></button></span></div><div data-line-number="64" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">64</div><div data-line-number="65" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">65</div><div data-line-number="66" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">66</div><div data-line-number="67" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">67</div><div data-line-number="68" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">68</div><div data-line-number="69" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">69</div><div data-line-number="70" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">70</div><div data-line-number="71" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">71</div><div data-line-number="72" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">72</div><div data-line-number="73" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">73</div><div data-line-number="74" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">74</div><div data-line-number="75" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">75</div><div data-line-number="76" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">76</div><div data-line-number="77" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">77</div><div data-line-number="78" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">78</div><div data-line-number="79" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">79</div><div data-line-number="80" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">80</div><div data-line-number="81" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">81</div><div data-line-number="82" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">82</div><div data-line-number="83" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">83</div><div data-line-number="84" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">84</div><div data-line-number="85" class="child-of-line-14 child-of-line-62  react-line-number react-code-text" style="padding-right:16px">85</div><div data-line-number="86" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">86</div><div data-line-number="87" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">87</div><div data-line-number="88" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">88</div><div data-line-number="89" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">89</div><div data-line-number="90" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">90</div><div data-line-number="91" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">91</div><div data-line-number="92" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">92</div><div data-line-number="93" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">93</div><div data-line-number="94" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">94</div><div data-line-number="95" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">95</div><div data-line-number="96" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">96</div><div data-line-number="97" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">97</div><div data-line-number="98" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">98</div><div data-line-number="99" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">99</div><div data-line-number="100" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">100</div><div data-line-number="101" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">101</div><div data-line-number="102" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">102</div><div data-line-number="103" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">103<span class="LineNumber-module__codeAlert__WexRo LineNumber-module__codeAlertRight__hdWmf"><button data-code-folding-chevron="true" type="button" aria-expanded="true" aria-label="Collapse code section" class="LineNumber-module__codeFoldingChevron__sY2Yt"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-chevron-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg></button></span></div><div data-line-number="104" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">104</div><div data-line-number="105" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">105</div><div data-line-number="106" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">106</div><div data-line-number="107" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">107</div><div data-line-number="108" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">108</div><div data-line-number="109" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">109</div><div data-line-number="110" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">110</div><div data-line-number="111" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">111</div><div data-line-number="112" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">112</div><div data-line-number="113" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">113</div><div data-line-number="114" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">114</div><div data-line-number="115" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">115</div><div data-line-number="116" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">116</div><div data-line-number="117" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">117</div><div data-line-number="118" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">118</div><div data-line-number="119" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">119</div><div data-line-number="120" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">120</div><div data-line-number="121" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">121</div><div data-line-number="122" class="child-of-line-14 child-of-line-102  react-line-number react-code-text" style="padding-right:16px">122</div><div data-line-number="123" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">123</div><div data-line-number="124" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">124</div><div data-line-number="125" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">125</div><div data-line-number="126" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">126</div><div data-line-number="127" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">127</div><div data-line-number="128" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">128</div><div data-line-number="129" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">129</div><div data-line-number="130" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">130</div><div data-line-number="131" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">131</div><div data-line-number="132" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">132</div><div data-line-number="133" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">133</div><div data-line-number="134" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">134</div><div data-line-number="135" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">135</div><div data-line-number="136" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">136</div><div data-line-number="137" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">137</div><div data-line-number="138" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">138</div><div data-line-number="139" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">139</div><div data-line-number="140" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">140</div><div data-line-number="141" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">141<span class="LineNumber-module__codeAlert__WexRo LineNumber-module__codeAlertRight__hdWmf"><button data-code-folding-chevron="true" type="button" aria-expanded="true" aria-label="Collapse code section" class="LineNumber-module__codeFoldingChevron__sY2Yt"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-chevron-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg></button></span></div><div data-line-number="142" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">142</div><div data-line-number="143" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">143</div><div data-line-number="144" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">144</div><div data-line-number="145" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">145</div><div data-line-number="146" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">146</div><div data-line-number="147" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">147</div><div data-line-number="148" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">148</div><div data-line-number="149" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">149</div><div data-line-number="150" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">150</div><div data-line-number="151" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">151</div><div data-line-number="152" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">152</div><div data-line-number="153" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">153</div><div data-line-number="154" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">154</div><div data-line-number="155" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">155</div><div data-line-number="156" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">156</div><div data-line-number="157" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">157</div><div data-line-number="158" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">158</div><div data-line-number="159" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">159</div><div data-line-number="160" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">160</div><div data-line-number="161" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">161</div><div data-line-number="162" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">162</div><div data-line-number="163" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">163</div><div data-line-number="164" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">164</div><div data-line-number="165" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">165</div><div data-line-number="166" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">166</div><div data-line-number="167" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">167</div><div data-line-number="168" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">168</div><div data-line-number="169" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">169</div><div data-line-number="170" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">170</div><div data-line-number="171" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">171</div><div data-line-number="172" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">172</div><div data-line-number="173" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">173</div><div data-line-number="174" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">174</div><div data-line-number="175" class="child-of-line-14 child-of-line-140  react-line-number react-code-text" style="padding-right:16px">175</div><div data-line-number="176" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">176</div><div data-line-number="177" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">177</div><div data-line-number="178" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">178</div><div data-line-number="179" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">179</div><div data-line-number="180" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">180</div><div data-line-number="181" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">181</div><div data-line-number="182" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">182</div><div data-line-number="183" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">183</div><div data-line-number="184" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">184</div><div data-line-number="185" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">185</div><div data-line-number="186" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">186</div><div data-line-number="187" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">187</div><div data-line-number="188" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">188</div><div data-line-number="189" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">189</div><div data-line-number="190" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">190</div><div data-line-number="191" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">191</div><div data-line-number="192" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">192</div><div data-line-number="193" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">193</div><div data-line-number="194" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">194<span class="LineNumber-module__codeAlert__WexRo LineNumber-module__codeAlertRight__hdWmf"><button data-code-folding-chevron="true" type="button" aria-expanded="true" aria-label="Collapse code section" class="LineNumber-module__codeFoldingChevron__sY2Yt"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-chevron-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg></button></span></div><div data-line-number="195" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">195</div><div data-line-number="196" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">196</div><div data-line-number="197" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">197</div><div data-line-number="198" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">198</div><div data-line-number="199" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">199</div><div data-line-number="200" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">200</div><div data-line-number="201" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">201</div><div data-line-number="202" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">202</div><div data-line-number="203" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">203</div><div data-line-number="204" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">204</div><div data-line-number="205" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">205</div><div data-line-number="206" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">206</div><div data-line-number="207" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">207</div><div data-line-number="208" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">208</div><div data-line-number="209" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">209</div><div data-line-number="210" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">210</div><div data-line-number="211" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">211</div><div data-line-number="212" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">212</div><div data-line-number="213" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">213</div><div data-line-number="214" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">214</div><div data-line-number="215" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">215</div><div data-line-number="216" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">216</div><div data-line-number="217" class="child-of-line-14 child-of-line-193  react-line-number react-code-text" style="padding-right:16px">217</div><div data-line-number="218" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">218</div><div data-line-number="219" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">219</div><div data-line-number="220" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">220</div><div data-line-number="221" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">221</div><div data-line-number="222" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">222</div><div data-line-number="223" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">223</div><div data-line-number="224" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">224</div><div data-line-number="225" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">225</div><div data-line-number="226" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">226</div><div data-line-number="227" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">227</div><div data-line-number="228" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">228</div><div data-line-number="229" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">229</div><div data-line-number="230" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">230</div><div data-line-number="231" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">231</div><div data-line-number="232" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">232</div><div data-line-number="233" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">233</div><div data-line-number="234" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">234</div><div data-line-number="235" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">235</div><div data-line-number="236" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">236</div><div data-line-number="237" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">237</div><div data-line-number="238" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">238<span class="LineNumber-module__codeAlert__WexRo LineNumber-module__codeAlertRight__hdWmf"><button data-code-folding-chevron="true" type="button" aria-expanded="true" aria-label="Collapse code section" class="LineNumber-module__codeFoldingChevron__sY2Yt"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-chevron-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg></button></span></div><div data-line-number="239" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">239</div><div data-line-number="240" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">240</div><div data-line-number="241" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">241</div><div data-line-number="242" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">242</div><div data-line-number="243" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">243</div><div data-line-number="244" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">244</div><div data-line-number="245" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">245</div><div data-line-number="246" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">246</div><div data-line-number="247" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">247</div><div data-line-number="248" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">248</div><div data-line-number="249" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">249</div><div data-line-number="250" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">250</div><div data-line-number="251" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">251</div><div data-line-number="252" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">252</div><div data-line-number="253" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">253</div><div data-line-number="254" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">254</div><div data-line-number="255" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">255</div><div data-line-number="256" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">256</div><div data-line-number="257" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">257</div><div data-line-number="258" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">258</div><div data-line-number="259" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">259</div><div data-line-number="260" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">260</div><div data-line-number="261" class="child-of-line-14 child-of-line-237  react-line-number react-code-text" style="padding-right:16px">261</div><div data-line-number="262" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">262</div><div data-line-number="263" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">263</div><div data-line-number="264" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">264</div><div data-line-number="265" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">265</div><div data-line-number="266" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">266</div><div data-line-number="267" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">267</div><div data-line-number="268" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">268</div><div data-line-number="269" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">269</div><div data-line-number="270" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">270</div><div data-line-number="271" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">271<span class="LineNumber-module__codeAlert__WexRo LineNumber-module__codeAlertRight__hdWmf"><button data-code-folding-chevron="true" type="button" aria-expanded="true" aria-label="Collapse code section" class="LineNumber-module__codeFoldingChevron__sY2Yt"><svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-chevron-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg></button></span></div><div data-line-number="272" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">272</div><div data-line-number="273" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">273</div><div data-line-number="274" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">274</div><div data-line-number="275" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">275</div><div data-line-number="276" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">276</div><div data-line-number="277" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">277</div><div data-line-number="278" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">278</div><div data-line-number="279" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">279</div><div data-line-number="280" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">280</div><div data-line-number="281" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">281</div><div data-line-number="282" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">282</div><div data-line-number="283" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">283</div><div data-line-number="284" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">284</div><div data-line-number="285" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">285</div><div data-line-number="286" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">286</div><div data-line-number="287" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">287</div><div data-line-number="288" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">288</div><div data-line-number="289" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">289</div><div data-line-number="290" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">290</div><div data-line-number="291" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">291</div><div data-line-number="292" class="child-of-line-14 child-of-line-270  react-line-number react-code-text" style="padding-right:16px">292</div><div data-line-number="293" class="child-of-line-14  react-line-number react-code-text" style="padding-right:16px">293</div><div data-line-number="294" class="react-line-number react-code-text" style="padding-right:16px">294</div><div data-line-number="295" class="react-line-number react-code-text" style="padding-right:16px">295</div><div data-line-number="296" class="react-line-number react-code-text" style="padding-right:16px">296</div><div data-line-number="297" class="react-line-number react-code-text" style="padding-right:16px">297</div><div data-line-number="298" class="react-line-number react-code-text" style="padding-right:16px">298</div><div data-line-number="299" class="react-line-number react-code-text" style="padding-right:16px">299</div><div data-line-number="300" class="react-line-number react-code-text" style="padding-right:16px">300</div><div data-line-number="301" class="react-line-number react-code-text" style="padding-right:16px">301</div><div data-line-number="302" class="react-line-number react-code-text" style="padding-right:16px">302</div><div data-line-number="303" class="react-line-number react-code-text" style="padding-right:16px">303</div><div data-line-number="304" class="react-line-number react-code-text" style="padding-right:16px">304</div><div data-line-number="305" class="react-line-number react-code-text" style="padding-right:16px">305</div><div data-line-number="306" class="react-line-number react-code-text" style="padding-right:16px">306</div><div data-line-number="307" class="react-line-number react-code-text" style="padding-right:16px">307</div><div data-line-number="308" class="react-line-number react-code-text" style="padding-right:16px">308</div><div data-line-number="309" class="react-line-number react-code-text" style="padding-right:16px">309</div><div data-line-number="310" class="react-line-number react-code-text" style="padding-right:16px">310</div><div data-line-number="311" class="react-line-number react-code-text" style="padding-right:16px">311</div><div data-line-number="312" class="react-line-number react-code-text" style="padding-right:16px">312</div><div data-line-number="313" class="react-line-number react-code-text" style="padding-right:16px">313</div><div data-line-number="314" class="react-line-number react-code-text" style="padding-right:16px">314</div><div data-line-number="315" class="react-line-number react-code-text" style="padding-right:16px">315</div><div data-line-number="316" class="react-line-number react-code-text" style="padding-right:16px">316</div><div data-line-number="317" class="react-line-number react-code-text" style="padding-right:16px">317</div><div data-line-number="318" class="react-line-number react-code-text" style="padding-right:16px">318</div><div data-line-number="319" class="react-line-number react-code-text" style="padding-right:16px">319</div><div data-line-number="320" class="react-line-number react-code-text" style="padding-right:16px">320</div><div data-line-number="321" class="react-line-number react-code-text" style="padding-right:16px">321</div><div data-line-number="322" class="react-line-number react-code-text" style="padding-right:16px">322</div><div data-line-number="323" class="react-line-number react-code-text" style="padding-right:16px">323</div><div data-line-number="324" class="react-line-number react-code-text" style="padding-right:16px">324</div><div data-line-number="325" class="react-line-number react-code-text" style="padding-right:16px">325</div><div data-line-number="326" class="react-line-number react-code-text" style="padding-right:16px">326</div><div data-line-number="327" class="react-line-number react-code-text" style="padding-right:16px">327</div><div data-line-number="328" class="react-line-number react-code-text" style="padding-right:16px">328</div><div data-line-number="329" class="react-line-number react-code-text" style="padding-right:16px">329</div><div data-line-number="330" class="react-line-number react-code-text" style="padding-right:16px">330</div><div data-line-number="331" class="react-line-number react-code-text" style="padding-right:16px">331</div><div data-line-number="332" class="react-line-number react-code-text" style="padding-right:16px">332</div><div data-line-number="333" class="react-line-number react-code-text" style="padding-right:16px">333</div><div data-line-number="334" class="react-line-number react-code-text" style="padding-right:16px">334</div><div data-line-number="335" class="react-line-number react-code-text" style="padding-right:16px">335</div><div data-line-number="336" class="react-line-number react-code-text" style="padding-right:16px">336</div><div data-line-number="337" class="react-line-number react-code-text" style="padding-right:16px">337</div><div data-line-number="338" class="react-line-number react-code-text" style="padding-right:16px">338</div><div data-line-number="339" class="react-line-number react-code-text" style="padding-right:16px">339</div><div data-line-number="340" class="react-line-number react-code-text" style="padding-right:16px">340</div><div data-line-number="341" class="react-line-number react-code-text" style="padding-right:16px">341</div><div data-line-number="342" class="react-line-number react-code-text" style="padding-right:16px">342</div><div data-line-number="343" class="react-line-number react-code-text" style="padding-right:16px">343</div><div data-line-number="344" class="react-line-number react-code-text" style="padding-right:16px">344</div><div data-line-number="345" class="react-line-number react-code-text" style="padding-right:16px">345</div><div data-line-number="346" class="react-line-number react-code-text" style="padding-right:16px">346</div><div data-line-number="347" class="react-line-number react-code-text" style="padding-right:16px">347</div><div data-line-number="348" class="react-line-number react-code-text" style="padding-right:16px">348</div><div data-line-number="349" class="react-line-number react-code-text" style="padding-right:16px">349</div><div data-line-number="350" class="react-line-number react-code-text" style="padding-right:16px">350</div><div data-line-number="351" class="react-line-number react-code-text" style="padding-right:16px">351</div><div data-line-number="352" class="react-line-number react-code-text" style="padding-right:16px">352</div><div data-line-number="353" class="react-line-number react-code-text" style="padding-right:16px">353</div><div data-line-number="354" class="react-line-number react-code-text" style="padding-right:16px">354</div></div><div class="react-code-lines"><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC1" class="react-file-line html-div" data-testid="code-cell" data-line-number="1" style="position:relative"><span class="pl-c">/**</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC2" class="react-file-line html-div" data-testid="code-cell" data-line-number="2" style="position:relative"><span class="pl-c"> * Copyright © https://github.com/microwind All rights reserved.</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC3" class="react-file-line html-div" data-testid="code-cell" data-line-number="3" style="position:relative"><span class="pl-c"> * </span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC4" class="react-file-line html-div" data-testid="code-cell" data-line-number="4" style="position:relative"><span class="pl-c"> * @author: jarryli@gmail.com</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC5" class="react-file-line html-div" data-testid="code-cell" data-line-number="5" style="position:relative"><span class="pl-c"> * @version: 1.0</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC6" class="react-file-line html-div" data-testid="code-cell" data-line-number="6" style="position:relative"><span class="pl-c"> */</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC7" class="react-file-line html-div" data-testid="code-cell" data-line-number="7" style="position:relative">
</div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC8" class="react-file-line html-div" data-testid="code-cell" data-line-number="8" style="position:relative"><span class="pl-c">/**</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC9" class="react-file-line html-div" data-testid="code-cell" data-line-number="9" style="position:relative"><span class="pl-c"> * 插入排序算法实现</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC10" class="react-file-line html-div" data-testid="code-cell" data-line-number="10" style="position:relative"><span class="pl-c"> * 提供5种不同的实现方式，适合不同场景和性能需求</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC11" class="react-file-line html-div" data-testid="code-cell" data-line-number="11" style="position:relative"><span class="pl-c"> */</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC12" class="react-file-line html-div" data-testid="code-cell" data-line-number="12" style="position:relative">
</div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC13" class="react-file-line html-div" data-testid="code-cell" data-line-number="13" style="position:relative"><span class="pl-k">import</span> <span class="pl-s1">java</span>.<span class="pl-s1">util</span>.<span class="pl-s1">Arrays</span>;</div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC14" class="react-file-line html-div" data-testid="code-cell" data-line-number="14" style="position:relative">
</div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC15" class="react-file-line html-div" data-testid="code-cell" data-line-number="15" style="position:relative"><span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">InsertSort</span> {</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC16" class="react-file-line html-div" data-testid="code-cell" data-line-number="16" style="position:relative">
</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC17" class="react-file-line html-div" data-testid="code-cell" data-line-number="17" style="position:relative">    <span class="pl-c">/**</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC18" class="react-file-line html-div" data-testid="code-cell" data-line-number="18" style="position:relative"><span class="pl-c">     * 打印数组内容的辅助函数</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC19" class="react-file-line html-div" data-testid="code-cell" data-line-number="19" style="position:relative"><span class="pl-c">     */</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC20" class="react-file-line html-div" data-testid="code-cell" data-line-number="20" style="position:relative">    <span class="pl-k">private</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-en">printArray</span>(<span class="pl-smi">int</span>[] <span class="pl-s1">arr</span>, <span class="pl-smi">String</span> <span class="pl-s1">label</span>) {</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC21" class="react-file-line html-div" data-testid="code-cell" data-line-number="21" style="position:relative">        <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s1">label</span> + <span class="pl-s">&quot;: &quot;</span> + <span class="pl-smi">Arrays</span>.<span class="pl-en">toString</span>(<span class="pl-s1">arr</span>));</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC22" class="react-file-line html-div" data-testid="code-cell" data-line-number="22" style="position:relative">    }</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC23" class="react-file-line html-div" data-testid="code-cell" data-line-number="23" style="position:relative">
</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC24" class="react-file-line html-div" data-testid="code-cell" data-line-number="24" style="position:relative">    <span class="pl-c">/**</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC25" class="react-file-line html-div" data-testid="code-cell" data-line-number="25" style="position:relative"><span class="pl-c">     * 性能测试辅助函数</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC26" class="react-file-line html-div" data-testid="code-cell" data-line-number="26" style="position:relative"><span class="pl-c">     */</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC27" class="react-file-line html-div" data-testid="code-cell" data-line-number="27" style="position:relative">    <span class="pl-k">private</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-en">performanceTest</span>(<span class="pl-smi">SortFunction</span> <span class="pl-s1">sortFunc</span>, <span class="pl-smi">int</span>[] <span class="pl-s1">arr</span>, <span class="pl-smi">String</span> <span class="pl-s1">name</span>) {</div></div></div><div class="child-of-line-14 child-of-line-26  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC28" class="react-file-line html-div" data-testid="code-cell" data-line-number="28" style="position:relative">        <span class="pl-c">// 创建数组副本，避免修改原数组</span></div></div></div><div class="child-of-line-14 child-of-line-26  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC29" class="react-file-line html-div" data-testid="code-cell" data-line-number="29" style="position:relative">        <span class="pl-smi">int</span>[] <span class="pl-s1">testArr</span> = <span class="pl-smi">Arrays</span>.<span class="pl-en">copyOf</span>(<span class="pl-s1">arr</span>, <span class="pl-s1">arr</span>.<span class="pl-s1">length</span>);</div></div></div><div class="child-of-line-14 child-of-line-26  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC30" class="react-file-line html-div" data-testid="code-cell" data-line-number="30" style="position:relative">        <span class="pl-en">printArray</span>(<span class="pl-s1">testArr</span>, <span class="pl-s1">name</span> + <span class="pl-s">&quot;原始数组&quot;</span>);</div></div></div><div class="child-of-line-14 child-of-line-26  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC31" class="react-file-line html-div" data-testid="code-cell" data-line-number="31" style="position:relative">        </div></div></div><div class="child-of-line-14 child-of-line-26  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC32" class="react-file-line html-div" data-testid="code-cell" data-line-number="32" style="position:relative">        <span class="pl-c">// 开始计时</span></div></div></div><div class="child-of-line-14 child-of-line-26  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC33" class="react-file-line html-div" data-testid="code-cell" data-line-number="33" style="position:relative">        <span class="pl-smi">long</span> <span class="pl-s1">startTime</span> = <span class="pl-smi">System</span>.<span class="pl-en">nanoTime</span>();</div></div></div><div class="child-of-line-14 child-of-line-26  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC34" class="react-file-line html-div" data-testid="code-cell" data-line-number="34" style="position:relative">        <span class="pl-s1">sortFunc</span>.<span class="pl-en">sort</span>(<span class="pl-s1">testArr</span>);</div></div></div><div class="child-of-line-14 child-of-line-26  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC35" class="react-file-line html-div" data-testid="code-cell" data-line-number="35" style="position:relative">        <span class="pl-smi">long</span> <span class="pl-s1">endTime</span> = <span class="pl-smi">System</span>.<span class="pl-en">nanoTime</span>();</div></div></div><div class="child-of-line-14 child-of-line-26  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC36" class="react-file-line html-div" data-testid="code-cell" data-line-number="36" style="position:relative">        </div></div></div><div class="child-of-line-14 child-of-line-26  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC37" class="react-file-line html-div" data-testid="code-cell" data-line-number="37" style="position:relative">        <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s1">name</span> + <span class="pl-s">&quot;: &quot;</span> + <span class="pl-smi">String</span>.<span class="pl-en">format</span>(<span class="pl-s">&quot;%.3f&quot;</span>, (<span class="pl-s1">endTime</span> - <span class="pl-s1">startTime</span>) / <span class="pl-c1">1_000_000.0</span>) + <span class="pl-s">&quot;ms&quot;</span>);</div></div></div><div class="child-of-line-14 child-of-line-26  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC38" class="react-file-line html-div" data-testid="code-cell" data-line-number="38" style="position:relative">        <span class="pl-en">printArray</span>(<span class="pl-s1">testArr</span>, <span class="pl-s1">name</span> + <span class="pl-s">&quot;排序结果&quot;</span>);</div></div></div><div class="child-of-line-14 child-of-line-26  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC39" class="react-file-line html-div" data-testid="code-cell" data-line-number="39" style="position:relative">        <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(); <span class="pl-c">// 空行分隔</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC40" class="react-file-line html-div" data-testid="code-cell" data-line-number="40" style="position:relative">    }</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC41" class="react-file-line html-div" data-testid="code-cell" data-line-number="41" style="position:relative">
</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC42" class="react-file-line html-div" data-testid="code-cell" data-line-number="42" style="position:relative">    <span class="pl-c">// ==================== 主程序：算法演示和性能测试 ====================</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC43" class="react-file-line html-div" data-testid="code-cell" data-line-number="43" style="position:relative">    </div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC44" class="react-file-line html-div" data-testid="code-cell" data-line-number="44" style="position:relative">    <span class="pl-c">// 测试数据：</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC45" class="react-file-line html-div" data-testid="code-cell" data-line-number="45" style="position:relative">    <span class="pl-k">private</span> <span class="pl-k">static</span> <span class="pl-k">final</span> <span class="pl-smi">int</span>[] <span class="pl-s1">testData</span> = {<span class="pl-c1">7</span>, <span class="pl-c1">11</span>, <span class="pl-c1">9</span>, <span class="pl-c1">10</span>, <span class="pl-c1">12</span>, <span class="pl-c1">13</span>, <span class="pl-c1">8</span>};</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC46" class="react-file-line html-div" data-testid="code-cell" data-line-number="46" style="position:relative">
</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC47" class="react-file-line html-div" data-testid="code-cell" data-line-number="47" style="position:relative">    <span class="pl-c">/**</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC48" class="react-file-line html-div" data-testid="code-cell" data-line-number="48" style="position:relative"><span class="pl-c">     * 插入排序基础版本 - 标准实现</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC49" class="react-file-line html-div" data-testid="code-cell" data-line-number="49" style="position:relative"><span class="pl-c">     * </span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC50" class="react-file-line html-div" data-testid="code-cell" data-line-number="50" style="position:relative"><span class="pl-c">     * 算法原理：</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC51" class="react-file-line html-div" data-testid="code-cell" data-line-number="51" style="position:relative"><span class="pl-c">     * 1. 从第二个元素开始，将其作为&quot;当前元素&quot;</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC52" class="react-file-line html-div" data-testid="code-cell" data-line-number="52" style="position:relative"><span class="pl-c">     * 2. 将当前元素与前面已排序的元素比较</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC53" class="react-file-line html-div" data-testid="code-cell" data-line-number="53" style="position:relative"><span class="pl-c">     * 3. 找到合适的位置插入当前元素</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC54" class="react-file-line html-div" data-testid="code-cell" data-line-number="54" style="position:relative"><span class="pl-c">     * 4. 重复步骤1-3，直到所有元素都排序完成</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC55" class="react-file-line html-div" data-testid="code-cell" data-line-number="55" style="position:relative"><span class="pl-c">     * </span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC56" class="react-file-line html-div" data-testid="code-cell" data-line-number="56" style="position:relative"><span class="pl-c">     * 生活类比：就像整理手中的扑克牌，</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC57" class="react-file-line html-div" data-testid="code-cell" data-line-number="57" style="position:relative"><span class="pl-c">     * 每次拿起一张新牌，插入到手中已排序牌的合适位置</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC58" class="react-file-line html-div" data-testid="code-cell" data-line-number="58" style="position:relative"><span class="pl-c">     * </span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC59" class="react-file-line html-div" data-testid="code-cell" data-line-number="59" style="position:relative"><span class="pl-c">     * 时间复杂度：平均O(n²)，最好O(n)，最坏O(n²)</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC60" class="react-file-line html-div" data-testid="code-cell" data-line-number="60" style="position:relative"><span class="pl-c">     * 空间复杂度：O(1) - 原地排序</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC61" class="react-file-line html-div" data-testid="code-cell" data-line-number="61" style="position:relative"><span class="pl-c">     * 稳定性：稳定 - 保持相等元素的相对位置</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC62" class="react-file-line html-div" data-testid="code-cell" data-line-number="62" style="position:relative"><span class="pl-c">     */</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC63" class="react-file-line html-div" data-testid="code-cell" data-line-number="63" style="position:relative">    <span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-en">insertSort1</span>(<span class="pl-smi">int</span>[] <span class="pl-s1">arr</span>) {</div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC64" class="react-file-line html-div" data-testid="code-cell" data-line-number="64" style="position:relative">        <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">&quot;insertSort1 standard:&quot;</span>);</div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC65" class="react-file-line html-div" data-testid="code-cell" data-line-number="65" style="position:relative">        </div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC66" class="react-file-line html-div" data-testid="code-cell" data-line-number="66" style="position:relative">        <span class="pl-c">// 第一步：从第二个元素开始遍历</span></div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC67" class="react-file-line html-div" data-testid="code-cell" data-line-number="67" style="position:relative">        <span class="pl-k">for</span> (<span class="pl-smi">int</span> <span class="pl-s1">i</span> = <span class="pl-c1">1</span>; <span class="pl-s1">i</span> &lt; <span class="pl-s1">arr</span>.<span class="pl-s1">length</span>; <span class="pl-s1">i</span>++) {</div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC68" class="react-file-line html-div" data-testid="code-cell" data-line-number="68" style="position:relative">            <span class="pl-smi">int</span> <span class="pl-s1">j</span> = <span class="pl-s1">i</span> - <span class="pl-c1">1</span>;</div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC69" class="react-file-line html-div" data-testid="code-cell" data-line-number="69" style="position:relative">            <span class="pl-c">// 待排序中的比较项</span></div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC70" class="react-file-line html-div" data-testid="code-cell" data-line-number="70" style="position:relative">            <span class="pl-smi">int</span> <span class="pl-s1">current</span> = <span class="pl-s1">arr</span>[<span class="pl-s1">i</span>];</div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC71" class="react-file-line html-div" data-testid="code-cell" data-line-number="71" style="position:relative">            <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">&quot;i=&quot;</span> + <span class="pl-s1">i</span> + <span class="pl-s">&quot; j=&quot;</span> + <span class="pl-s1">j</span> + <span class="pl-s">&quot; current=&quot;</span> + <span class="pl-s1">current</span> + <span class="pl-s">&quot; arr[i]=&quot;</span> + <span class="pl-s1">arr</span>[<span class="pl-s1">i</span>] + <span class="pl-s">&quot; arr[j + 1]=&quot;</span> + <span class="pl-s1">arr</span>[<span class="pl-s1">j</span> + <span class="pl-c1">1</span>] + <span class="pl-s">&quot; arr[]=&quot;</span> + <span class="pl-smi">Arrays</span>.<span class="pl-en">toString</span>(<span class="pl-s1">arr</span>));</div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC72" class="react-file-line html-div" data-testid="code-cell" data-line-number="72" style="position:relative">            </div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC73" class="react-file-line html-div" data-testid="code-cell" data-line-number="73" style="position:relative">            <span class="pl-c">// 第二步：向前查找插入位置，同时移动元素</span></div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC74" class="react-file-line html-div" data-testid="code-cell" data-line-number="74" style="position:relative">            <span class="pl-k">while</span> (<span class="pl-s1">j</span> &gt;= <span class="pl-c1">0</span> &amp;&amp; <span class="pl-s1">current</span> &lt; <span class="pl-s1">arr</span>[<span class="pl-s1">j</span>]) {</div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC75" class="react-file-line html-div" data-testid="code-cell" data-line-number="75" style="position:relative">                <span class="pl-c">// 将比较项跟已排序列表项逐个对比</span></div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC76" class="react-file-line html-div" data-testid="code-cell" data-line-number="76" style="position:relative">                <span class="pl-c">// 如果比较项小于列表项，则将列表项逐个右移</span></div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC77" class="react-file-line html-div" data-testid="code-cell" data-line-number="77" style="position:relative">                <span class="pl-s1">arr</span>[<span class="pl-s1">j</span> + <span class="pl-c1">1</span>] = <span class="pl-s1">arr</span>[<span class="pl-s1">j</span>];</div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC78" class="react-file-line html-div" data-testid="code-cell" data-line-number="78" style="position:relative">                <span class="pl-s1">j</span>--;</div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC79" class="react-file-line html-div" data-testid="code-cell" data-line-number="79" style="position:relative">            }</div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC80" class="react-file-line html-div" data-testid="code-cell" data-line-number="80" style="position:relative">            </div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC81" class="react-file-line html-div" data-testid="code-cell" data-line-number="81" style="position:relative">            <span class="pl-c">// 第三步：将比较项插入到空出的位置</span></div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC82" class="react-file-line html-div" data-testid="code-cell" data-line-number="82" style="position:relative">            <span class="pl-s1">arr</span>[<span class="pl-s1">j</span> + <span class="pl-c1">1</span>] = <span class="pl-s1">current</span>;</div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC83" class="react-file-line html-div" data-testid="code-cell" data-line-number="83" style="position:relative">        }</div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC84" class="react-file-line html-div" data-testid="code-cell" data-line-number="84" style="position:relative">        </div></div></div><div class="child-of-line-14 child-of-line-62  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC85" class="react-file-line html-div" data-testid="code-cell" data-line-number="85" style="position:relative">        <span class="pl-en">printArray</span>(<span class="pl-s1">arr</span>, <span class="pl-s">&quot;排序后数组&quot;</span>);</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC86" class="react-file-line html-div" data-testid="code-cell" data-line-number="86" style="position:relative">    }</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC87" class="react-file-line html-div" data-testid="code-cell" data-line-number="87" style="position:relative">
</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC88" class="react-file-line html-div" data-testid="code-cell" data-line-number="88" style="position:relative">    <span class="pl-c">/**</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC89" class="react-file-line html-div" data-testid="code-cell" data-line-number="89" style="position:relative"><span class="pl-c">     * 插入排序优化版本 - 二分查找插入位置</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC90" class="react-file-line html-div" data-testid="code-cell" data-line-number="90" style="position:relative"><span class="pl-c">     * </span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC91" class="react-file-line html-div" data-testid="code-cell" data-line-number="91" style="position:relative"><span class="pl-c">     * 算法思路：</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC92" class="react-file-line html-div" data-testid="code-cell" data-line-number="92" style="position:relative"><span class="pl-c">     * 使用二分查找确定插入位置，减少比较次数</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC93" class="react-file-line html-div" data-testid="code-cell" data-line-number="93" style="position:relative"><span class="pl-c">     * 保持插入操作，但优化查找过程</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC94" class="react-file-line html-div" data-testid="code-cell" data-line-number="94" style="position:relative"><span class="pl-c">     * </span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC95" class="react-file-line html-div" data-testid="code-cell" data-line-number="95" style="position:relative"><span class="pl-c">     * 优化效果：</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC96" class="react-file-line html-div" data-testid="code-cell" data-line-number="96" style="position:relative"><span class="pl-c">     * - 减少比较次数：从O(n)到O(log n)</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC97" class="react-file-line html-div" data-testid="code-cell" data-line-number="97" style="position:relative"><span class="pl-c">     * - 保持插入操作的时间复杂度</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC98" class="react-file-line html-div" data-testid="code-cell" data-line-number="98" style="position:relative"><span class="pl-c">     * </span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC99" class="react-file-line html-div" data-testid="code-cell" data-line-number="99" style="position:relative"><span class="pl-c">     * 时间复杂度：平均O(n²)，最好O(n log n)，最坏O(n²)</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC100" class="react-file-line html-div" data-testid="code-cell" data-line-number="100" style="position:relative"><span class="pl-c">     * 空间复杂度：O(1) - 原地排序</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC101" class="react-file-line html-div" data-testid="code-cell" data-line-number="101" style="position:relative"><span class="pl-c">     * 稳定性：稳定</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC102" class="react-file-line html-div" data-testid="code-cell" data-line-number="102" style="position:relative"><span class="pl-c">     */</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC103" class="react-file-line html-div" data-testid="code-cell" data-line-number="103" style="position:relative">    <span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-en">insertSort2</span>(<span class="pl-smi">int</span>[] <span class="pl-s1">arr</span>) {</div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC104" class="react-file-line html-div" data-testid="code-cell" data-line-number="104" style="position:relative">        <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">&quot;insertSort2 for loop ascending:&quot;</span>);</div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC105" class="react-file-line html-div" data-testid="code-cell" data-line-number="105" style="position:relative">        </div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC106" class="react-file-line html-div" data-testid="code-cell" data-line-number="106" style="position:relative">        <span class="pl-c">// 第一步：外循环是待排序列表，内循环是已排序列表</span></div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC107" class="react-file-line html-div" data-testid="code-cell" data-line-number="107" style="position:relative">        <span class="pl-c">// 这里i可以自1开始</span></div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC108" class="react-file-line html-div" data-testid="code-cell" data-line-number="108" style="position:relative">        <span class="pl-k">for</span> (<span class="pl-smi">int</span> <span class="pl-s1">i</span> = <span class="pl-c1">1</span>; <span class="pl-s1">i</span> &lt; <span class="pl-s1">arr</span>.<span class="pl-s1">length</span>; <span class="pl-s1">i</span>++) {</div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC109" class="react-file-line html-div" data-testid="code-cell" data-line-number="109" style="position:relative">            <span class="pl-smi">int</span> <span class="pl-s1">j</span> = <span class="pl-s1">i</span> - <span class="pl-c1">1</span>;</div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC110" class="react-file-line html-div" data-testid="code-cell" data-line-number="110" style="position:relative">            <span class="pl-smi">int</span> <span class="pl-s1">current</span> = <span class="pl-s1">arr</span>[<span class="pl-s1">i</span>];</div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC111" class="react-file-line html-div" data-testid="code-cell" data-line-number="111" style="position:relative">            <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">&quot;i=&quot;</span> + <span class="pl-s1">i</span> + <span class="pl-s">&quot; j=&quot;</span> + <span class="pl-s1">j</span> + <span class="pl-s">&quot; current=&quot;</span> + <span class="pl-s1">current</span> + <span class="pl-s">&quot; arr[i]=&quot;</span> + <span class="pl-s1">arr</span>[<span class="pl-s1">i</span>] + <span class="pl-s">&quot; arr[j + 1]=&quot;</span> + <span class="pl-s1">arr</span>[<span class="pl-s1">j</span> + <span class="pl-c1">1</span>] + <span class="pl-s">&quot; arr[]=&quot;</span> + <span class="pl-smi">Arrays</span>.<span class="pl-en">toString</span>(<span class="pl-s1">arr</span>));</div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC112" class="react-file-line html-div" data-testid="code-cell" data-line-number="112" style="position:relative">            </div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC113" class="react-file-line html-div" data-testid="code-cell" data-line-number="113" style="position:relative">            <span class="pl-c">// 第二步：如果当前项比已排序项小，把已比较项逐个右移，空出位置来给当前项</span></div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC114" class="react-file-line html-div" data-testid="code-cell" data-line-number="114" style="position:relative">            <span class="pl-k">for</span> (; <span class="pl-s1">j</span> &gt;= <span class="pl-c1">0</span> &amp;&amp; <span class="pl-s1">current</span> &lt; <span class="pl-s1">arr</span>[<span class="pl-s1">j</span>]; <span class="pl-s1">j</span>--) {</div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC115" class="react-file-line html-div" data-testid="code-cell" data-line-number="115" style="position:relative">                <span class="pl-s1">arr</span>[<span class="pl-s1">j</span> + <span class="pl-c1">1</span>] = <span class="pl-s1">arr</span>[<span class="pl-s1">j</span>];</div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC116" class="react-file-line html-div" data-testid="code-cell" data-line-number="116" style="position:relative">            }</div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC117" class="react-file-line html-div" data-testid="code-cell" data-line-number="117" style="position:relative">            </div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC118" class="react-file-line html-div" data-testid="code-cell" data-line-number="118" style="position:relative">            <span class="pl-c">// 第三步：将当前项插入到正确位置</span></div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC119" class="react-file-line html-div" data-testid="code-cell" data-line-number="119" style="position:relative">            <span class="pl-s1">arr</span>[<span class="pl-s1">j</span> + <span class="pl-c1">1</span>] = <span class="pl-s1">current</span>;</div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC120" class="react-file-line html-div" data-testid="code-cell" data-line-number="120" style="position:relative">        }</div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC121" class="react-file-line html-div" data-testid="code-cell" data-line-number="121" style="position:relative">        </div></div></div><div class="child-of-line-14 child-of-line-102  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC122" class="react-file-line html-div" data-testid="code-cell" data-line-number="122" style="position:relative">        <span class="pl-en">printArray</span>(<span class="pl-s1">arr</span>, <span class="pl-s">&quot;排序后数组&quot;</span>);</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC123" class="react-file-line html-div" data-testid="code-cell" data-line-number="123" style="position:relative">    }</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC124" class="react-file-line html-div" data-testid="code-cell" data-line-number="124" style="position:relative">
</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC125" class="react-file-line html-div" data-testid="code-cell" data-line-number="125" style="position:relative">    <span class="pl-c">/**</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC126" class="react-file-line html-div" data-testid="code-cell" data-line-number="126" style="position:relative"><span class="pl-c">     * 插入排序 - 哨兵版本</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC127" class="react-file-line html-div" data-testid="code-cell" data-line-number="127" style="position:relative"><span class="pl-c">     * </span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC128" class="react-file-line html-div" data-testid="code-cell" data-line-number="128" style="position:relative"><span class="pl-c">     * 算法思路：</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC129" class="react-file-line html-div" data-testid="code-cell" data-line-number="129" style="position:relative"><span class="pl-c">     * 在数组开头添加哨兵元素，简化边界检查</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC130" class="react-file-line html-div" data-testid="code-cell" data-line-number="130" style="position:relative"><span class="pl-c">     * 减少循环中的条件判断</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC131" class="react-file-line html-div" data-testid="code-cell" data-line-number="131" style="position:relative"><span class="pl-c">     * </span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC132" class="react-file-line html-div" data-testid="code-cell" data-line-number="132" style="position:relative"><span class="pl-c">     * 优化效果：</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC133" class="react-file-line html-div" data-testid="code-cell" data-line-number="133" style="position:relative"><span class="pl-c">     * - 减少边界检查</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC134" class="react-file-line html-div" data-testid="code-cell" data-line-number="134" style="position:relative"><span class="pl-c">     * - 简化代码逻辑</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC135" class="react-file-line html-div" data-testid="code-cell" data-line-number="135" style="position:relative"><span class="pl-c">     * - 轻微的性能提升</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC136" class="react-file-line html-div" data-testid="code-cell" data-line-number="136" style="position:relative"><span class="pl-c">     * </span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC137" class="react-file-line html-div" data-testid="code-cell" data-line-number="137" style="position:relative"><span class="pl-c">     * 时间复杂度：平均O(n²)，最好O(n)，最坏O(n²)</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC138" class="react-file-line html-div" data-testid="code-cell" data-line-number="138" style="position:relative"><span class="pl-c">     * 空间复杂度：O(1) - 原地排序（忽略哨兵）</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC139" class="react-file-line html-div" data-testid="code-cell" data-line-number="139" style="position:relative"><span class="pl-c">     * 稳定性：稳定</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC140" class="react-file-line html-div" data-testid="code-cell" data-line-number="140" style="position:relative"><span class="pl-c">     */</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC141" class="react-file-line html-div" data-testid="code-cell" data-line-number="141" style="position:relative">    <span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-en">insertSort3</span>(<span class="pl-smi">int</span>[] <span class="pl-s1">arr</span>) {</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC142" class="react-file-line html-div" data-testid="code-cell" data-line-number="142" style="position:relative">        <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">&quot;insertSort3 sentinel:&quot;</span>);</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC143" class="react-file-line html-div" data-testid="code-cell" data-line-number="143" style="position:relative">        </div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC144" class="react-file-line html-div" data-testid="code-cell" data-line-number="144" style="position:relative">        <span class="pl-k">if</span> (<span class="pl-s1">arr</span>.<span class="pl-s1">length</span> == <span class="pl-c1">0</span>) <span class="pl-k">return</span>;</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC145" class="react-file-line html-div" data-testid="code-cell" data-line-number="145" style="position:relative">        </div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC146" class="react-file-line html-div" data-testid="code-cell" data-line-number="146" style="position:relative">        <span class="pl-c">// 第一步：找到最小值作为哨兵</span></div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC147" class="react-file-line html-div" data-testid="code-cell" data-line-number="147" style="position:relative">        <span class="pl-smi">int</span> <span class="pl-s1">minIndex</span> = <span class="pl-c1">0</span>;</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC148" class="react-file-line html-div" data-testid="code-cell" data-line-number="148" style="position:relative">        <span class="pl-k">for</span> (<span class="pl-smi">int</span> <span class="pl-s1">i</span> = <span class="pl-c1">1</span>; <span class="pl-s1">i</span> &lt; <span class="pl-s1">arr</span>.<span class="pl-s1">length</span>; <span class="pl-s1">i</span>++) {</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC149" class="react-file-line html-div" data-testid="code-cell" data-line-number="149" style="position:relative">            <span class="pl-k">if</span> (<span class="pl-s1">arr</span>[<span class="pl-s1">i</span>] &lt; <span class="pl-s1">arr</span>[<span class="pl-s1">minIndex</span>]) {</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC150" class="react-file-line html-div" data-testid="code-cell" data-line-number="150" style="position:relative">                <span class="pl-s1">minIndex</span> = <span class="pl-s1">i</span>;</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC151" class="react-file-line html-div" data-testid="code-cell" data-line-number="151" style="position:relative">            }</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC152" class="react-file-line html-div" data-testid="code-cell" data-line-number="152" style="position:relative">        }</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC153" class="react-file-line html-div" data-testid="code-cell" data-line-number="153" style="position:relative">        </div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC154" class="react-file-line html-div" data-testid="code-cell" data-line-number="154" style="position:relative">        <span class="pl-c">// 第二步：将最小值移到开头作为哨兵</span></div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC155" class="react-file-line html-div" data-testid="code-cell" data-line-number="155" style="position:relative">        <span class="pl-k">if</span> (<span class="pl-s1">minIndex</span> != <span class="pl-c1">0</span>) {</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC156" class="react-file-line html-div" data-testid="code-cell" data-line-number="156" style="position:relative">            <span class="pl-smi">int</span> <span class="pl-s1">temp</span> = <span class="pl-s1">arr</span>[<span class="pl-c1">0</span>];</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC157" class="react-file-line html-div" data-testid="code-cell" data-line-number="157" style="position:relative">            <span class="pl-s1">arr</span>[<span class="pl-c1">0</span>] = <span class="pl-s1">arr</span>[<span class="pl-s1">minIndex</span>];</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC158" class="react-file-line html-div" data-testid="code-cell" data-line-number="158" style="position:relative">            <span class="pl-s1">arr</span>[<span class="pl-s1">minIndex</span>] = <span class="pl-s1">temp</span>;</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC159" class="react-file-line html-div" data-testid="code-cell" data-line-number="159" style="position:relative">        }</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC160" class="react-file-line html-div" data-testid="code-cell" data-line-number="160" style="position:relative">        </div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC161" class="react-file-line html-div" data-testid="code-cell" data-line-number="161" style="position:relative">        <span class="pl-c">// 第三步：从第三个元素开始排序（第二个元素已经相对于哨兵有序）</span></div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC162" class="react-file-line html-div" data-testid="code-cell" data-line-number="162" style="position:relative">        <span class="pl-k">for</span> (<span class="pl-smi">int</span> <span class="pl-s1">i</span> = <span class="pl-c1">2</span>; <span class="pl-s1">i</span> &lt; <span class="pl-s1">arr</span>.<span class="pl-s1">length</span>; <span class="pl-s1">i</span>++) {</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC163" class="react-file-line html-div" data-testid="code-cell" data-line-number="163" style="position:relative">            <span class="pl-smi">int</span> <span class="pl-s1">current</span> = <span class="pl-s1">arr</span>[<span class="pl-s1">i</span>];</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC164" class="react-file-line html-div" data-testid="code-cell" data-line-number="164" style="position:relative">            <span class="pl-smi">int</span> <span class="pl-s1">j</span> = <span class="pl-s1">i</span>;</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC165" class="react-file-line html-div" data-testid="code-cell" data-line-number="165" style="position:relative">            </div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC166" class="react-file-line html-div" data-testid="code-cell" data-line-number="166" style="position:relative">            <span class="pl-c">// 第四步：向前查找插入位置（哨兵保证不会越界）</span></div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC167" class="react-file-line html-div" data-testid="code-cell" data-line-number="167" style="position:relative">            <span class="pl-k">while</span> (<span class="pl-s1">arr</span>[<span class="pl-s1">j</span> - <span class="pl-c1">1</span>] &gt; <span class="pl-s1">current</span>) {</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC168" class="react-file-line html-div" data-testid="code-cell" data-line-number="168" style="position:relative">                <span class="pl-s1">arr</span>[<span class="pl-s1">j</span>] = <span class="pl-s1">arr</span>[<span class="pl-s1">j</span> - <span class="pl-c1">1</span>];</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC169" class="react-file-line html-div" data-testid="code-cell" data-line-number="169" style="position:relative">                <span class="pl-s1">j</span>--;</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC170" class="react-file-line html-div" data-testid="code-cell" data-line-number="170" style="position:relative">            }</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC171" class="react-file-line html-div" data-testid="code-cell" data-line-number="171" style="position:relative">            </div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC172" class="react-file-line html-div" data-testid="code-cell" data-line-number="172" style="position:relative">            <span class="pl-s1">arr</span>[<span class="pl-s1">j</span>] = <span class="pl-s1">current</span>;</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC173" class="react-file-line html-div" data-testid="code-cell" data-line-number="173" style="position:relative">        }</div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC174" class="react-file-line html-div" data-testid="code-cell" data-line-number="174" style="position:relative">        </div></div></div><div class="child-of-line-14 child-of-line-140  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC175" class="react-file-line html-div" data-testid="code-cell" data-line-number="175" style="position:relative">        <span class="pl-en">printArray</span>(<span class="pl-s1">arr</span>, <span class="pl-s">&quot;排序后数组&quot;</span>);</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC176" class="react-file-line html-div" data-testid="code-cell" data-line-number="176" style="position:relative">    }</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC177" class="react-file-line html-div" data-testid="code-cell" data-line-number="177" style="position:relative">
</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC178" class="react-file-line html-div" data-testid="code-cell" data-line-number="178" style="position:relative">    <span class="pl-c">/**</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC179" class="react-file-line html-div" data-testid="code-cell" data-line-number="179" style="position:relative"><span class="pl-c">     * 插入排序 - 希尔插入版本</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC180" class="react-file-line html-div" data-testid="code-cell" data-line-number="180" style="position:relative"><span class="pl-c">     * </span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC181" class="react-file-line html-div" data-testid="code-cell" data-line-number="181" style="position:relative"><span class="pl-c">     * 算法思路：</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC182" class="react-file-line html-div" data-testid="code-cell" data-line-number="182" style="position:relative"><span class="pl-c">     * 结合希尔排序的增量概念</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC183" class="react-file-line html-div" data-testid="code-cell" data-line-number="183" style="position:relative"><span class="pl-c">     * 对不同间隔的子序列进行插入排序</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC184" class="react-file-line html-div" data-testid="code-cell" data-line-number="184" style="position:relative"><span class="pl-c">     * </span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC185" class="react-file-line html-div" data-testid="code-cell" data-line-number="185" style="position:relative"><span class="pl-c">     * 优化效果：</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC186" class="react-file-line html-div" data-testid="code-cell" data-line-number="186" style="position:relative"><span class="pl-c">     * - 更好的初始数据分布</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC187" class="react-file-line html-div" data-testid="code-cell" data-line-number="187" style="position:relative"><span class="pl-c">     * - 减少总的移动次数</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC188" class="react-file-line html-div" data-testid="code-cell" data-line-number="188" style="position:relative"><span class="pl-c">     * - 适合部分有序的数据</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC189" class="react-file-line html-div" data-testid="code-cell" data-line-number="189" style="position:relative"><span class="pl-c">     * </span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC190" class="react-file-line html-div" data-testid="code-cell" data-line-number="190" style="position:relative"><span class="pl-c">     * 时间复杂度：平均O(n^1.3)，取决于增量序列</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC191" class="react-file-line html-div" data-testid="code-cell" data-line-number="191" style="position:relative"><span class="pl-c">     * 空间复杂度：O(1) - 原地排序</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC192" class="react-file-line html-div" data-testid="code-cell" data-line-number="192" style="position:relative"><span class="pl-c">     * 稳定性：不稳定 - 增量排序可能破坏稳定性</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC193" class="react-file-line html-div" data-testid="code-cell" data-line-number="193" style="position:relative"><span class="pl-c">     */</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC194" class="react-file-line html-div" data-testid="code-cell" data-line-number="194" style="position:relative">    <span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-en">insertSort4</span>(<span class="pl-smi">int</span>[] <span class="pl-s1">arr</span>) {</div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC195" class="react-file-line html-div" data-testid="code-cell" data-line-number="195" style="position:relative">        <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">&quot;insertSort4 shell insertion:&quot;</span>);</div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC196" class="react-file-line html-div" data-testid="code-cell" data-line-number="196" style="position:relative">        </div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC197" class="react-file-line html-div" data-testid="code-cell" data-line-number="197" style="position:relative">        <span class="pl-smi">int</span> <span class="pl-s1">n</span> = <span class="pl-s1">arr</span>.<span class="pl-s1">length</span>;</div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC198" class="react-file-line html-div" data-testid="code-cell" data-line-number="198" style="position:relative">        </div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC199" class="react-file-line html-div" data-testid="code-cell" data-line-number="199" style="position:relative">        <span class="pl-c">// 第一步：使用希尔增量序列</span></div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC200" class="react-file-line html-div" data-testid="code-cell" data-line-number="200" style="position:relative">        <span class="pl-k">for</span> (<span class="pl-smi">int</span> <span class="pl-s1">gap</span> = <span class="pl-s1">n</span> / <span class="pl-c1">2</span>; <span class="pl-s1">gap</span> &gt; <span class="pl-c1">0</span>; <span class="pl-s1">gap</span> /= <span class="pl-c1">2</span>) {</div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC201" class="react-file-line html-div" data-testid="code-cell" data-line-number="201" style="position:relative">            <span class="pl-c">// 第二步：对每个增量进行插入排序</span></div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC202" class="react-file-line html-div" data-testid="code-cell" data-line-number="202" style="position:relative">            <span class="pl-k">for</span> (<span class="pl-smi">int</span> <span class="pl-s1">i</span> = <span class="pl-s1">gap</span>; <span class="pl-s1">i</span> &lt; <span class="pl-s1">n</span>; <span class="pl-s1">i</span>++) {</div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC203" class="react-file-line html-div" data-testid="code-cell" data-line-number="203" style="position:relative">                <span class="pl-smi">int</span> <span class="pl-s1">current</span> = <span class="pl-s1">arr</span>[<span class="pl-s1">i</span>];</div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC204" class="react-file-line html-div" data-testid="code-cell" data-line-number="204" style="position:relative">                <span class="pl-smi">int</span> <span class="pl-s1">j</span> = <span class="pl-s1">i</span>;</div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC205" class="react-file-line html-div" data-testid="code-cell" data-line-number="205" style="position:relative">                </div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC206" class="react-file-line html-div" data-testid="code-cell" data-line-number="206" style="position:relative">                <span class="pl-c">// 第三步：在增量子序列中进行插入排序</span></div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC207" class="react-file-line html-div" data-testid="code-cell" data-line-number="207" style="position:relative">                <span class="pl-k">while</span> (<span class="pl-s1">j</span> &gt;= <span class="pl-s1">gap</span> &amp;&amp; <span class="pl-s1">arr</span>[<span class="pl-s1">j</span> - <span class="pl-s1">gap</span>] &gt; <span class="pl-s1">current</span>) {</div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC208" class="react-file-line html-div" data-testid="code-cell" data-line-number="208" style="position:relative">                    <span class="pl-s1">arr</span>[<span class="pl-s1">j</span>] = <span class="pl-s1">arr</span>[<span class="pl-s1">j</span> - <span class="pl-s1">gap</span>];</div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC209" class="react-file-line html-div" data-testid="code-cell" data-line-number="209" style="position:relative">                    <span class="pl-s1">j</span> -= <span class="pl-s1">gap</span>;</div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC210" class="react-file-line html-div" data-testid="code-cell" data-line-number="210" style="position:relative">                }</div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC211" class="react-file-line html-div" data-testid="code-cell" data-line-number="211" style="position:relative">                </div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC212" class="react-file-line html-div" data-testid="code-cell" data-line-number="212" style="position:relative">                <span class="pl-c">// 第四步：插入当前元素</span></div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC213" class="react-file-line html-div" data-testid="code-cell" data-line-number="213" style="position:relative">                <span class="pl-s1">arr</span>[<span class="pl-s1">j</span>] = <span class="pl-s1">current</span>;</div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC214" class="react-file-line html-div" data-testid="code-cell" data-line-number="214" style="position:relative">            }</div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC215" class="react-file-line html-div" data-testid="code-cell" data-line-number="215" style="position:relative">        }</div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC216" class="react-file-line html-div" data-testid="code-cell" data-line-number="216" style="position:relative">        </div></div></div><div class="child-of-line-14 child-of-line-193  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC217" class="react-file-line html-div" data-testid="code-cell" data-line-number="217" style="position:relative">        <span class="pl-en">printArray</span>(<span class="pl-s1">arr</span>, <span class="pl-s">&quot;排序后数组&quot;</span>);</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC218" class="react-file-line html-div" data-testid="code-cell" data-line-number="218" style="position:relative">    }</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC219" class="react-file-line html-div" data-testid="code-cell" data-line-number="219" style="position:relative">
</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC220" class="react-file-line html-div" data-testid="code-cell" data-line-number="220" style="position:relative">    <span class="pl-c">/**</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC221" class="react-file-line html-div" data-testid="code-cell" data-line-number="221" style="position:relative"><span class="pl-c">     * 插入排序降序版本</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC222" class="react-file-line html-div" data-testid="code-cell" data-line-number="222" style="position:relative"><span class="pl-c">     * </span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC223" class="react-file-line html-div" data-testid="code-cell" data-line-number="223" style="position:relative"><span class="pl-c">     * 算法思路：</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC224" class="react-file-line html-div" data-testid="code-cell" data-line-number="224" style="position:relative"><span class="pl-c">     * 1. 从第二个元素开始，将其作为&quot;当前元素&quot;</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC225" class="react-file-line html-div" data-testid="code-cell" data-line-number="225" style="position:relative"><span class="pl-c">     * 2. 将当前元素与前面已排序的元素比较（降序）</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC226" class="react-file-line html-div" data-testid="code-cell" data-line-number="226" style="position:relative"><span class="pl-c">     * 3. 找到合适的位置插入当前元素（大的在前）</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC227" class="react-file-line html-div" data-testid="code-cell" data-line-number="227" style="position:relative"><span class="pl-c">     * 4. 重复步骤1-3，直到所有元素都排序完成</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC228" class="react-file-line html-div" data-testid="code-cell" data-line-number="228" style="position:relative"><span class="pl-c">     * </span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC229" class="react-file-line html-div" data-testid="code-cell" data-line-number="229" style="position:relative"><span class="pl-c">     * 特色：</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC230" class="react-file-line html-div" data-testid="code-cell" data-line-number="230" style="position:relative"><span class="pl-c">     * - 降序排列：大的元素排在前面</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC231" class="react-file-line html-div" data-testid="code-cell" data-line-number="231" style="position:relative"><span class="pl-c">     * - break控制：使用break提前退出循环</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC232" class="react-file-line html-div" data-testid="code-cell" data-line-number="232" style="position:relative"><span class="pl-c">     * - 条件反转：比较条件是 current &gt; arr[j]</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC233" class="react-file-line html-div" data-testid="code-cell" data-line-number="233" style="position:relative"><span class="pl-c">     * </span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC234" class="react-file-line html-div" data-testid="code-cell" data-line-number="234" style="position:relative"><span class="pl-c">     * 时间复杂度：平均O(n²)，最好O(n)，最坏O(n²)</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC235" class="react-file-line html-div" data-testid="code-cell" data-line-number="235" style="position:relative"><span class="pl-c">     * 空间复杂度：O(1) - 原地排序</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC236" class="react-file-line html-div" data-testid="code-cell" data-line-number="236" style="position:relative"><span class="pl-c">     * 稳定性：稳定 - 保持相等元素的相对位置</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC237" class="react-file-line html-div" data-testid="code-cell" data-line-number="237" style="position:relative"><span class="pl-c">     */</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC238" class="react-file-line html-div" data-testid="code-cell" data-line-number="238" style="position:relative">    <span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-en">insertSort5</span>(<span class="pl-smi">int</span>[] <span class="pl-s1">arr</span>) {</div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC239" class="react-file-line html-div" data-testid="code-cell" data-line-number="239" style="position:relative">        <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">&quot;insertSort5 for loop descending:&quot;</span>);</div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC240" class="react-file-line html-div" data-testid="code-cell" data-line-number="240" style="position:relative">        </div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC241" class="react-file-line html-div" data-testid="code-cell" data-line-number="241" style="position:relative">        <span class="pl-c">// 第一步：从第一个元素开始遍历</span></div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC242" class="react-file-line html-div" data-testid="code-cell" data-line-number="242" style="position:relative">        <span class="pl-k">for</span> (<span class="pl-smi">int</span> <span class="pl-s1">i</span> = <span class="pl-c1">0</span>; <span class="pl-s1">i</span> &lt; <span class="pl-s1">arr</span>.<span class="pl-s1">length</span>; <span class="pl-s1">i</span>++) {</div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC243" class="react-file-line html-div" data-testid="code-cell" data-line-number="243" style="position:relative">            <span class="pl-smi">int</span> <span class="pl-s1">current</span> = <span class="pl-s1">arr</span>[<span class="pl-s1">i</span>];</div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC244" class="react-file-line html-div" data-testid="code-cell" data-line-number="244" style="position:relative">            <span class="pl-smi">int</span> <span class="pl-s1">j</span> = <span class="pl-s1">i</span> - <span class="pl-c1">1</span>;</div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC245" class="react-file-line html-div" data-testid="code-cell" data-line-number="245" style="position:relative">            <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">&quot;i=&quot;</span> + <span class="pl-s1">i</span> + <span class="pl-s">&quot; j=&quot;</span> + <span class="pl-s1">j</span> + <span class="pl-s">&quot; current=&quot;</span> + <span class="pl-s1">current</span> + <span class="pl-s">&quot; arr[i]=&quot;</span> + <span class="pl-s1">arr</span>[<span class="pl-s1">i</span>] + <span class="pl-s">&quot; arr[j + 1]=&quot;</span> + <span class="pl-s1">arr</span>[<span class="pl-s1">j</span> + <span class="pl-c1">1</span>] + <span class="pl-s">&quot; arr[]=&quot;</span> + <span class="pl-smi">Arrays</span>.<span class="pl-en">toString</span>(<span class="pl-s1">arr</span>));</div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC246" class="react-file-line html-div" data-testid="code-cell" data-line-number="246" style="position:relative">            </div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC247" class="react-file-line html-div" data-testid="code-cell" data-line-number="247" style="position:relative">            <span class="pl-c">// 第二步：当前项比已排序的内容要大，则逐个右移，空出位置</span></div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC248" class="react-file-line html-div" data-testid="code-cell" data-line-number="248" style="position:relative">            <span class="pl-k">for</span> (; <span class="pl-s1">j</span> &gt;= <span class="pl-c1">0</span>; <span class="pl-s1">j</span>--) {</div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC249" class="react-file-line html-div" data-testid="code-cell" data-line-number="249" style="position:relative">                <span class="pl-k">if</span> (<span class="pl-s1">current</span> &gt; <span class="pl-s1">arr</span>[<span class="pl-s1">j</span>]) {</div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC250" class="react-file-line html-div" data-testid="code-cell" data-line-number="250" style="position:relative">                    <span class="pl-s1">arr</span>[<span class="pl-s1">j</span> + <span class="pl-c1">1</span>] = <span class="pl-s1">arr</span>[<span class="pl-s1">j</span>];</div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC251" class="react-file-line html-div" data-testid="code-cell" data-line-number="251" style="position:relative">                } <span class="pl-k">else</span> {</div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC252" class="react-file-line html-div" data-testid="code-cell" data-line-number="252" style="position:relative">                    <span class="pl-c">// 第三步：当小于已排序内容，则跳出循环</span></div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC253" class="react-file-line html-div" data-testid="code-cell" data-line-number="253" style="position:relative">                    <span class="pl-k">break</span>;</div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC254" class="react-file-line html-div" data-testid="code-cell" data-line-number="254" style="position:relative">                }</div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC255" class="react-file-line html-div" data-testid="code-cell" data-line-number="255" style="position:relative">            }</div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC256" class="react-file-line html-div" data-testid="code-cell" data-line-number="256" style="position:relative">            </div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC257" class="react-file-line html-div" data-testid="code-cell" data-line-number="257" style="position:relative">            <span class="pl-c">// 第四步：将当前项插入到正确位置</span></div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC258" class="react-file-line html-div" data-testid="code-cell" data-line-number="258" style="position:relative">            <span class="pl-s1">arr</span>[<span class="pl-s1">j</span> + <span class="pl-c1">1</span>] = <span class="pl-s1">current</span>;</div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC259" class="react-file-line html-div" data-testid="code-cell" data-line-number="259" style="position:relative">        }</div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC260" class="react-file-line html-div" data-testid="code-cell" data-line-number="260" style="position:relative">        </div></div></div><div class="child-of-line-14 child-of-line-237  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC261" class="react-file-line html-div" data-testid="code-cell" data-line-number="261" style="position:relative">        <span class="pl-en">printArray</span>(<span class="pl-s1">arr</span>, <span class="pl-s">&quot;排序后数组&quot;</span>);</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC262" class="react-file-line html-div" data-testid="code-cell" data-line-number="262" style="position:relative">    }</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC263" class="react-file-line html-div" data-testid="code-cell" data-line-number="263" style="position:relative">
</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC264" class="react-file-line html-div" data-testid="code-cell" data-line-number="264" style="position:relative">    <span class="pl-c">// ==================== 算法测试和性能对比 ====================</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC265" class="react-file-line html-div" data-testid="code-cell" data-line-number="265" style="position:relative">    </div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC266" class="react-file-line html-div" data-testid="code-cell" data-line-number="266" style="position:relative">    <span class="pl-c1">@</span><span class="pl-c1">FunctionalInterface</span></div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC267" class="react-file-line html-div" data-testid="code-cell" data-line-number="267" style="position:relative">    <span class="pl-k">private</span> <span class="pl-k">interface</span> <span class="pl-smi">SortFunction</span> {</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC268" class="react-file-line html-div" data-testid="code-cell" data-line-number="268" style="position:relative">        <span class="pl-smi">void</span> <span class="pl-en">sort</span>(<span class="pl-smi">int</span>[] <span class="pl-s1">arr</span>);</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC269" class="react-file-line html-div" data-testid="code-cell" data-line-number="269" style="position:relative">    }</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC270" class="react-file-line html-div" data-testid="code-cell" data-line-number="270" style="position:relative">
</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC271" class="react-file-line html-div" data-testid="code-cell" data-line-number="271" style="position:relative">    <span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-en">main</span>(<span class="pl-smi">String</span>[] <span class="pl-s1">args</span>) {</div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC272" class="react-file-line html-div" data-testid="code-cell" data-line-number="272" style="position:relative">        <span class="pl-c">// 测试1：标准版本</span></div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC273" class="react-file-line html-div" data-testid="code-cell" data-line-number="273" style="position:relative">        <span class="pl-en">performanceTest</span>(<span class="pl-smi">InsertSort</span>::<span class="pl-s1">insertSort1</span>, <span class="pl-s1">testData</span>, <span class="pl-s">&quot;标准版本&quot;</span>);</div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC274" class="react-file-line html-div" data-testid="code-cell" data-line-number="274" style="position:relative">
</div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC275" class="react-file-line html-div" data-testid="code-cell" data-line-number="275" style="position:relative">        <span class="pl-c">// 测试2：for循环升序版本</span></div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC276" class="react-file-line html-div" data-testid="code-cell" data-line-number="276" style="position:relative">        <span class="pl-en">performanceTest</span>(<span class="pl-smi">InsertSort</span>::<span class="pl-s1">insertSort2</span>, <span class="pl-s1">testData</span>, <span class="pl-s">&quot;for循环升序版本&quot;</span>);</div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC277" class="react-file-line html-div" data-testid="code-cell" data-line-number="277" style="position:relative">
</div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC278" class="react-file-line html-div" data-testid="code-cell" data-line-number="278" style="position:relative">        <span class="pl-c">// 测试3：哨兵版本</span></div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC279" class="react-file-line html-div" data-testid="code-cell" data-line-number="279" style="position:relative">        <span class="pl-en">performanceTest</span>(<span class="pl-smi">InsertSort</span>::<span class="pl-s1">insertSort3</span>, <span class="pl-s1">testData</span>, <span class="pl-s">&quot;哨兵版本&quot;</span>);</div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC280" class="react-file-line html-div" data-testid="code-cell" data-line-number="280" style="position:relative">
</div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC281" class="react-file-line html-div" data-testid="code-cell" data-line-number="281" style="position:relative">        <span class="pl-c">// 测试4：希尔插入版本</span></div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC282" class="react-file-line html-div" data-testid="code-cell" data-line-number="282" style="position:relative">        <span class="pl-en">performanceTest</span>(<span class="pl-smi">InsertSort</span>::<span class="pl-s1">insertSort4</span>, <span class="pl-s1">testData</span>, <span class="pl-s">&quot;希尔插入版本&quot;</span>);</div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC283" class="react-file-line html-div" data-testid="code-cell" data-line-number="283" style="position:relative">
</div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC284" class="react-file-line html-div" data-testid="code-cell" data-line-number="284" style="position:relative">        <span class="pl-c">// 测试5：降序版本</span></div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC285" class="react-file-line html-div" data-testid="code-cell" data-line-number="285" style="position:relative">        <span class="pl-en">performanceTest</span>(<span class="pl-smi">InsertSort</span>::<span class="pl-s1">insertSort5</span>, <span class="pl-s1">testData</span>, <span class="pl-s">&quot;降序版本&quot;</span>);</div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC286" class="react-file-line html-div" data-testid="code-cell" data-line-number="286" style="position:relative">
</div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC287" class="react-file-line html-div" data-testid="code-cell" data-line-number="287" style="position:relative">        <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">&quot;=== 算法对比总结 ===&quot;</span>);</div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC288" class="react-file-line html-div" data-testid="code-cell" data-line-number="288" style="position:relative">        <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">&quot;1. 标准版本：经典实现，易于理解&quot;</span>);</div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC289" class="react-file-line html-div" data-testid="code-cell" data-line-number="289" style="position:relative">        <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">&quot;2. for循环升序版本：for循环实现，逻辑清晰&quot;</span>);</div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC290" class="react-file-line html-div" data-testid="code-cell" data-line-number="290" style="position:relative">        <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">&quot;3. 哨兵版本：简化边界，提升性能&quot;</span>);</div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC291" class="react-file-line html-div" data-testid="code-cell" data-line-number="291" style="position:relative">        <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">&quot;4. 希尔插入版本：增量排序，混合优化&quot;</span>);</div></div></div><div class="child-of-line-14 child-of-line-270  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC292" class="react-file-line html-div" data-testid="code-cell" data-line-number="292" style="position:relative">        <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">&quot;5. 降序版本：降序排列，break控制&quot;</span>);</div></div></div><div class="child-of-line-14  react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC293" class="react-file-line html-div" data-testid="code-cell" data-line-number="293" style="position:relative">    }</div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC294" class="react-file-line html-div" data-testid="code-cell" data-line-number="294" style="position:relative">}</div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC295" class="react-file-line html-div" data-testid="code-cell" data-line-number="295" style="position:relative">
</div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC296" class="react-file-line html-div" data-testid="code-cell" data-line-number="296" style="position:relative"><span class="pl-c">/*</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC297" class="react-file-line html-div" data-testid="code-cell" data-line-number="297" style="position:relative"><span class="pl-c">打印结果</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC298" class="react-file-line html-div" data-testid="code-cell" data-line-number="298" style="position:relative"><span class="pl-c">jarry@Mac insertsort % java InsertSort.java</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC299" class="react-file-line html-div" data-testid="code-cell" data-line-number="299" style="position:relative"><span class="pl-c">标准版本原始数组: [7, 11, 9, 10, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC300" class="react-file-line html-div" data-testid="code-cell" data-line-number="300" style="position:relative"><span class="pl-c">insertSort1 standard:</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC301" class="react-file-line html-div" data-testid="code-cell" data-line-number="301" style="position:relative"><span class="pl-c">i=1 j=0 current=11 arr[i]=11 arr[j + 1]=11 arr[]=[7, 11, 9, 10, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC302" class="react-file-line html-div" data-testid="code-cell" data-line-number="302" style="position:relative"><span class="pl-c">i=2 j=1 current=9 arr[i]=9 arr[j + 1]=9 arr[]=[7, 11, 9, 10, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC303" class="react-file-line html-div" data-testid="code-cell" data-line-number="303" style="position:relative"><span class="pl-c">i=3 j=2 current=10 arr[i]=10 arr[j + 1]=10 arr[]=[7, 9, 11, 10, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC304" class="react-file-line html-div" data-testid="code-cell" data-line-number="304" style="position:relative"><span class="pl-c">i=4 j=3 current=12 arr[i]=12 arr[j + 1]=12 arr[]=[7, 9, 10, 11, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC305" class="react-file-line html-div" data-testid="code-cell" data-line-number="305" style="position:relative"><span class="pl-c">i=5 j=4 current=13 arr[i]=13 arr[j + 1]=13 arr[]=[7, 9, 10, 11, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC306" class="react-file-line html-div" data-testid="code-cell" data-line-number="306" style="position:relative"><span class="pl-c">i=6 j=5 current=8 arr[i]=8 arr[j + 1]=8 arr[]=[7, 9, 10, 11, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC307" class="react-file-line html-div" data-testid="code-cell" data-line-number="307" style="position:relative"><span class="pl-c">排序后数组: [7, 8, 9, 10, 11, 12, 13]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC308" class="react-file-line html-div" data-testid="code-cell" data-line-number="308" style="position:relative"><span class="pl-c">标准版本: 2.924ms</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC309" class="react-file-line html-div" data-testid="code-cell" data-line-number="309" style="position:relative"><span class="pl-c">标准版本排序结果: [7, 8, 9, 10, 11, 12, 13]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC310" class="react-file-line html-div" data-testid="code-cell" data-line-number="310" style="position:relative">
</div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC311" class="react-file-line html-div" data-testid="code-cell" data-line-number="311" style="position:relative"><span class="pl-c">for循环升序版本原始数组: [7, 11, 9, 10, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC312" class="react-file-line html-div" data-testid="code-cell" data-line-number="312" style="position:relative"><span class="pl-c">insertSort2 for loop ascending:</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC313" class="react-file-line html-div" data-testid="code-cell" data-line-number="313" style="position:relative"><span class="pl-c">i=1 j=0 current=11 arr[i]=11 arr[j + 1]=11 arr[]=[7, 11, 9, 10, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC314" class="react-file-line html-div" data-testid="code-cell" data-line-number="314" style="position:relative"><span class="pl-c">i=2 j=1 current=9 arr[i]=9 arr[j + 1]=9 arr[]=[7, 11, 9, 10, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC315" class="react-file-line html-div" data-testid="code-cell" data-line-number="315" style="position:relative"><span class="pl-c">i=3 j=2 current=10 arr[i]=10 arr[j + 1]=10 arr[]=[7, 9, 11, 10, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC316" class="react-file-line html-div" data-testid="code-cell" data-line-number="316" style="position:relative"><span class="pl-c">i=4 j=3 current=12 arr[i]=12 arr[j + 1]=12 arr[]=[7, 9, 10, 11, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC317" class="react-file-line html-div" data-testid="code-cell" data-line-number="317" style="position:relative"><span class="pl-c">i=5 j=4 current=13 arr[i]=13 arr[j + 1]=13 arr[]=[7, 9, 10, 11, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC318" class="react-file-line html-div" data-testid="code-cell" data-line-number="318" style="position:relative"><span class="pl-c">i=6 j=5 current=8 arr[i]=8 arr[j + 1]=8 arr[]=[7, 9, 10, 11, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC319" class="react-file-line html-div" data-testid="code-cell" data-line-number="319" style="position:relative"><span class="pl-c">排序后数组: [7, 8, 9, 10, 11, 12, 13]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC320" class="react-file-line html-div" data-testid="code-cell" data-line-number="320" style="position:relative"><span class="pl-c">for循环升序版本: 0.190ms</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC321" class="react-file-line html-div" data-testid="code-cell" data-line-number="321" style="position:relative"><span class="pl-c">for循环升序版本排序结果: [7, 8, 9, 10, 11, 12, 13]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC322" class="react-file-line html-div" data-testid="code-cell" data-line-number="322" style="position:relative">
</div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC323" class="react-file-line html-div" data-testid="code-cell" data-line-number="323" style="position:relative"><span class="pl-c">哨兵版本原始数组: [7, 11, 9, 10, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC324" class="react-file-line html-div" data-testid="code-cell" data-line-number="324" style="position:relative"><span class="pl-c">insertSort3 sentinel:</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC325" class="react-file-line html-div" data-testid="code-cell" data-line-number="325" style="position:relative"><span class="pl-c">排序后数组: [7, 8, 9, 10, 11, 12, 13]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC326" class="react-file-line html-div" data-testid="code-cell" data-line-number="326" style="position:relative"><span class="pl-c">哨兵版本: 0.021ms</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC327" class="react-file-line html-div" data-testid="code-cell" data-line-number="327" style="position:relative"><span class="pl-c">哨兵版本排序结果: [7, 8, 9, 10, 11, 12, 13]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC328" class="react-file-line html-div" data-testid="code-cell" data-line-number="328" style="position:relative">
</div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC329" class="react-file-line html-div" data-testid="code-cell" data-line-number="329" style="position:relative"><span class="pl-c">希尔插入版本原始数组: [7, 11, 9, 10, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC330" class="react-file-line html-div" data-testid="code-cell" data-line-number="330" style="position:relative"><span class="pl-c">insertSort4 shell insertion:</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC331" class="react-file-line html-div" data-testid="code-cell" data-line-number="331" style="position:relative"><span class="pl-c">排序后数组: [7, 8, 9, 10, 11, 12, 13]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC332" class="react-file-line html-div" data-testid="code-cell" data-line-number="332" style="position:relative"><span class="pl-c">希尔插入版本: 0.025ms</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC333" class="react-file-line html-div" data-testid="code-cell" data-line-number="333" style="position:relative"><span class="pl-c">希尔插入版本排序结果: [7, 8, 9, 10, 11, 12, 13]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC334" class="react-file-line html-div" data-testid="code-cell" data-line-number="334" style="position:relative">
</div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC335" class="react-file-line html-div" data-testid="code-cell" data-line-number="335" style="position:relative"><span class="pl-c">降序版本原始数组: [7, 11, 9, 10, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC336" class="react-file-line html-div" data-testid="code-cell" data-line-number="336" style="position:relative"><span class="pl-c">insertSort5 for loop descending:</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC337" class="react-file-line html-div" data-testid="code-cell" data-line-number="337" style="position:relative"><span class="pl-c">i=0 j=-1 current=7 arr[i]=7 arr[j + 1]=7 arr[]=[7, 11, 9, 10, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC338" class="react-file-line html-div" data-testid="code-cell" data-line-number="338" style="position:relative"><span class="pl-c">i=1 j=0 current=11 arr[i]=11 arr[j + 1]=11 arr[]=[7, 11, 9, 10, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC339" class="react-file-line html-div" data-testid="code-cell" data-line-number="339" style="position:relative"><span class="pl-c">i=2 j=1 current=9 arr[i]=9 arr[j + 1]=9 arr[]=[11, 7, 9, 10, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC340" class="react-file-line html-div" data-testid="code-cell" data-line-number="340" style="position:relative"><span class="pl-c">i=3 j=2 current=10 arr[i]=10 arr[j + 1]=10 arr[]=[11, 9, 7, 10, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC341" class="react-file-line html-div" data-testid="code-cell" data-line-number="341" style="position:relative"><span class="pl-c">i=4 j=3 current=12 arr[i]=12 arr[j + 1]=12 arr[]=[11, 10, 9, 7, 12, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC342" class="react-file-line html-div" data-testid="code-cell" data-line-number="342" style="position:relative"><span class="pl-c">i=5 j=4 current=13 arr[i]=13 arr[j + 1]=13 arr[]=[12, 11, 10, 9, 7, 13, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC343" class="react-file-line html-div" data-testid="code-cell" data-line-number="343" style="position:relative"><span class="pl-c">i=6 j=5 current=8 arr[i]=8 arr[j + 1]=8 arr[]=[13, 12, 11, 10, 9, 7, 8]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC344" class="react-file-line html-div" data-testid="code-cell" data-line-number="344" style="position:relative"><span class="pl-c">排序后数组: [13, 12, 11, 10, 9, 8, 7]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC345" class="react-file-line html-div" data-testid="code-cell" data-line-number="345" style="position:relative"><span class="pl-c">降序版本: 0.193ms</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC346" class="react-file-line html-div" data-testid="code-cell" data-line-number="346" style="position:relative"><span class="pl-c">降序版本排序结果: [13, 12, 11, 10, 9, 8, 7]</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC347" class="react-file-line html-div" data-testid="code-cell" data-line-number="347" style="position:relative">
</div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC348" class="react-file-line html-div" data-testid="code-cell" data-line-number="348" style="position:relative"><span class="pl-c">=== 算法对比总结 ===</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC349" class="react-file-line html-div" data-testid="code-cell" data-line-number="349" style="position:relative"><span class="pl-c">1. 标准版本：经典实现，易于理解</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC350" class="react-file-line html-div" data-testid="code-cell" data-line-number="350" style="position:relative"><span class="pl-c">2. for循环升序版本：for循环实现，逻辑清晰</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC351" class="react-file-line html-div" data-testid="code-cell" data-line-number="351" style="position:relative"><span class="pl-c">3. 哨兵版本：简化边界，提升性能</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC352" class="react-file-line html-div" data-testid="code-cell" data-line-number="352" style="position:relative"><span class="pl-c">4. 希尔插入版本：增量排序，混合优化</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC353" class="react-file-line html-div" data-testid="code-cell" data-line-number="353" style="position:relative"><span class="pl-c">5. 降序版本：降序排列，break控制</span></div></div></div><div class="react-code-text react-code-line-contents" style="min-height:auto"><div><div id="LC354" class="react-file-line html-div" data-testid="code-cell" data-line-number="354" style="position:relative"><span class="pl-c">*/</span></div></div></div></div></div></div><div id="copilot-button-container"></div></div><div id="highlighted-line-menu-container"></div><div class="HighlightedLineMenu-module__overlayPortalRoot__QDpCt"></div></div></div><!--/$--><div class="d-none"></div></section></div></div></div> </div> <!-- --> </div></div></div></div></div></div><div class="ScrollMarksContainer-module__scrollMarksContainer__Eu7uU" id="find-result-marks-container"></div><div class="d-none"></div><div class="d-none"></div></div> <!-- --> <!-- --> </div>
</react-app>




  </div>

</turbo-frame>

    </main>
  </div>

  </div>

          <footer class="footer f6 color-fg-muted color-border-subtle tmp-pt-7 tmp-pb-6 p-responsive" role="contentinfo"  >
  <h2 class='sr-only'>Footer</h2>

  


  <div class="d-flex flex-justify-center flex-items-center flex-column-reverse flex-lg-row flex-wrap flex-lg-nowrap">
    <div class="d-flex flex-items-center flex-shrink-0 mx-2">
      <a aria-label="GitHub Homepage" class="footer-octicon mr-2" href="https://github.com">
        <svg aria-hidden="true" data-component="Octicon" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-mark-github">
    <path d="M10.226 17.284c-2.965-.36-5.054-2.493-5.054-5.256 0-1.123.404-2.336 1.078-3.144-.292-.741-.247-2.314.09-2.965.898-.112 2.111.36 2.83 1.01.853-.269 1.752-.404 2.853-.404 1.1 0 1.999.135 2.807.382.696-.629 1.932-1.1 2.83-.988.315.606.36 2.179.067 2.942.72.854 1.101 2 1.101 3.167 0 2.763-2.089 4.852-5.098 5.234.763.494 1.28 1.572 1.28 2.807v2.336c0 .674.561 1.056 1.235.786 4.066-1.55 7.255-5.615 7.255-10.646C23.5 6.188 18.334 1 11.978 1 5.62 1 .5 6.188.5 12.545c0 4.986 3.167 9.12 7.435 10.669.606.225 1.19-.18 1.19-.786V20.63a2.9 2.9 0 0 1-1.078.224c-1.483 0-2.359-.808-2.987-2.313-.247-.607-.517-.966-1.034-1.033-.27-.023-.359-.135-.359-.27 0-.27.45-.471.898-.471.652 0 1.213.404 1.797 1.235.45.651.921.943 1.483.943.561 0 .92-.202 1.437-.719.382-.381.674-.718.944-.943"></path>
</svg>
</a>
      <span>
        &copy; 2026 GitHub,&nbsp;Inc.
      </span>
    </div>

    <nav aria-label="Footer">
      <h3 class="sr-only" id="sr-footer-heading">Footer navigation</h3>

      <ul class="list-style-none d-flex flex-justify-center flex-wrap mb-2 mb-lg-0" aria-labelledby="sr-footer-heading">


          <li class="mx-2">
            <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to Terms&quot;,&quot;label&quot;:&quot;text:terms&quot;}" href="https://docs.github.com/site-policy/github-terms/github-terms-of-service" data-view-component="true" class="Link--secondary Link">Terms</a>
          </li>

          <li class="mx-2">
            <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to privacy&quot;,&quot;label&quot;:&quot;text:privacy&quot;}" href="https://docs.github.com/site-policy/privacy-policies/github-privacy-statement" data-view-component="true" class="Link--secondary Link">Privacy</a>
          </li>


            <li class="mx-2">
              <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to security&quot;,&quot;label&quot;:&quot;text:security&quot;}" href="https://github.com/security" data-view-component="true" class="Link--secondary Link">Security</a>
            </li>

            <li class="mx-2">
              <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to status&quot;,&quot;label&quot;:&quot;text:status&quot;}" href="https://www.githubstatus.com/" data-view-component="true" class="Link--secondary Link">Status</a>
            </li>

          <li class="mx-2">
            <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to community&quot;,&quot;label&quot;:&quot;text:community&quot;}" href="https://github.community/" data-view-component="true" class="Link--secondary Link">Community</a>
          </li>

          <li class="mx-2">
            <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to docs&quot;,&quot;label&quot;:&quot;text:docs&quot;}" href="https://docs.github.com/" data-view-component="true" class="Link--secondary Link">Docs</a>
          </li>

          <li class="mx-2">
            <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to contact&quot;,&quot;label&quot;:&quot;text:contact&quot;}" href="https://support.github.com?tags=dotcom-footer" data-view-component="true" class="Link--secondary Link">Contact</a>
          </li>

          
<li class="mx-2" >
  <cookie-consent-link>
    <button
      type="button"
      class="Link--secondary underline-on-hover border-0 p-0 color-bg-transparent"
      data-action="click:cookie-consent-link#showConsentManagement"
      data-analytics-event="{&quot;location&quot;:&quot;footer&quot;,&quot;action&quot;:&quot;cookies&quot;,&quot;context&quot;:&quot;subfooter&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;cookies_link_subfooter_footer&quot;}"
    >
      Manage cookies
    </button>
  </cookie-consent-link>
</li>

  <li class="mx-2">
    <cookie-consent-link>
      <button
        type="button"
        class="Link--secondary underline-on-hover border-0 p-0 color-bg-transparent text-left"
        data-action="click:cookie-consent-link#showConsentManagement"
        data-analytics-event="{&quot;location&quot;:&quot;footer&quot;,&quot;action&quot;:&quot;dont_share_info&quot;,&quot;context&quot;:&quot;subfooter&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;dont_share_info_link_subfooter_footer&quot;}"
      >
        Do not share my personal information
      </button>
    </cookie-consent-link>
  </li>

      </ul>
    </nav>
  </div>
</footer>



    <ghcc-consent id="ghcc" class="position-fixed bottom-0 left-0" style="z-index: 999999"
      data-locale="en"
      data-initial-cookie-consent-allowed=""
      data-cookie-consent-required="true"
    ></ghcc-consent>




  <div id="ajax-error-message" class="ajax-error-message flash flash-error" hidden>
    <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert">
    <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path>
</svg>
    <button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error">
      <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x">
    <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path>
</svg>
    </button>
    You can’t perform that action at this time.
  </div>

    <template id="site-details-dialog">
  <details class="details-reset details-overlay details-overlay-dark lh-default color-fg-default hx_rsm" open>
    <summary role="button" aria-label="Close dialog"></summary>
    <details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast hx_rsm-dialog hx_rsm-modal">
      <button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog>
        <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x">
    <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path>
</svg>
      </button>
      <div class="octocat-spinner tmp-my-6 js-details-dialog-spinner"></div>
    </details-dialog>
  </details>
</template>

    <div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;">
  <div class="Popover-message Popover-message--bottom-left Popover-message--large Box color-shadow-large" style="width:360px;">
  </div>
</div>

    <template id="snippet-clipboard-copy-button">
  <div class="zeroclipboard-container position-absolute right-0 top-0">
    <clipboard-copy aria-label="Copy code to clipboard" class="ClipboardButton btn js-clipboard-copy m-2 p-0" data-copy-feedback="Copied!" data-tooltip-direction="w">
      <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon m-2 tmp-m-2">
    <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path>
</svg>
      <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none m-2 tmp-m-2">
    <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path>
</svg>
    </clipboard-copy>
  </div>
</template>
<template id="snippet-clipboard-copy-button-unpositioned">
  <div class="zeroclipboard-container">
    <clipboard-copy aria-label="Copy code to clipboard" class="ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 d-flex flex-justify-center flex-items-center" data-copy-feedback="Copied!" data-tooltip-direction="w">
      <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon">
    <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path>
</svg>
      <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none">
    <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path>
</svg>
    </clipboard-copy>
  </div>
</template>




    </div>
    <div id="js-global-screen-reader-notice" class="sr-only mt-n1" aria-live="polite" aria-atomic="true" ></div>
    <div id="js-global-screen-reader-notice-assertive" class="sr-only mt-n1" aria-live="assertive" aria-atomic="true"></div>
  </body>
</html>

