Git Product home page Git Product logo

Comments (4)

ourongxing avatar ourongxing commented on August 28, 2024

我这边没有这问题啊,说不定 chatgpt 就返回的这个结果。

from chatgpt-vercel.

catch6 avatar catch6 commented on August 28, 2024

我这边没有这问题啊,说不定 chatgpt 就返回的这个结果。

是的,chatgpt返回的就是这,第一次遇见这情况

from chatgpt-vercel.

catch6 avatar catch6 commented on August 28, 2024

格式仍然有问题,而且跟 chatgpt 无关,下面是我输入的内容:

我正在解力扣215. 数组中的第K个最大元素,下面是我的代码,问题出在哪里
    public int findKthLargest(int[] nums, int k) {
        int target = nums.length - k;
        int l = 0, r = nums.length - 1;
        while (true) {
            int pivotIndex = partition(nums, l, r);
            if (target == pivotIndex) {
                return nums[target];
            } else if (pivotIndex > target) {
                r = pivotIndex - 1;
            } else {
                l = pivotIndex + 1;
            }
        }
    }

    private int partition(int[] nums, int l, int r) {
        int middle = l + (r - l) / 2;
        int pivot = nums[middle];
        while (l < r) {
            while (nums[l] < pivot) {
                l++;
            }
            while (nums[r] > pivot) {
                r--;
            }
            if (l <= r) {
                int tmp = nums[l];
                nums[l] = nums[r];
                nums[r] = tmp;
                l++;
                r--;
            }
        }
        return r;
    }

但是渲染后,格式却错乱了:
image

而且最近chatgpt 的回复渲染出来的代码,有挺高几率都会出现代码错乱,可能跟 chatgpt 返回的代码包含缩进有关,渲染的时候识别错误。

from chatgpt-vercel.

ourongxing avatar ourongxing commented on August 28, 2024

markdown 换行的要求是空格+回车

from chatgpt-vercel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.