<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>K-Sum on 111qqz's blog</title><link>https://111qqz.com/en/tags/k-sum/</link><description>Recent content in K-Sum on 111qqz's blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© 2015-2026 111qqz</copyright><lastBuildDate>Thu, 13 Apr 2017 09:45:45 +0000</lastBuildDate><atom:link href="https://111qqz.com/en/tags/k-sum/index.xml" rel="self" type="application/rss+xml"/><item><title>leetcode 16. 3Sum Closest (k-sum问题，two pointer)</title><link>https://111qqz.com/en/post/acm-icpc/2017/2017-04-13-leetcode-16-3sum-closest/</link><pubDate>Thu, 13 Apr 2017 09:45:45 +0000</pubDate><guid>https://111qqz.com/en/post/acm-icpc/2017/2017-04-13-leetcode-16-3sum-closest/</guid><description>&lt;p&gt;Given an array &lt;em&gt;S&lt;/em&gt; of &lt;em&gt;n&lt;/em&gt; integers, find three integers in &lt;em&gt;S&lt;/em&gt; such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution.&lt;/p&gt;</description></item><item><title>leetcode 18. 4Sum (k-sum问题，two pointer)</title><link>https://111qqz.com/en/post/acm-icpc/2017/2017-04-13-leetcode-18-4sum/</link><pubDate>Thu, 13 Apr 2017 09:34:15 +0000</pubDate><guid>https://111qqz.com/en/post/acm-icpc/2017/2017-04-13-leetcode-18-4sum/</guid><description>&lt;p&gt;Given an array &lt;em&gt;S&lt;/em&gt; of &lt;em&gt;n&lt;/em&gt; integers, are there elements &lt;em&gt;a&lt;/em&gt;, &lt;em&gt;b&lt;/em&gt;, &lt;em&gt;c&lt;/em&gt;, and &lt;em&gt;d&lt;/em&gt; in &lt;em&gt;S&lt;/em&gt; such that &lt;em&gt;a&lt;/em&gt; + &lt;em&gt;b&lt;/em&gt; + &lt;em&gt;c&lt;/em&gt; + &lt;em&gt;d&lt;/em&gt; = target? Find all unique quadruplets in the array which gives the sum of target.&lt;/p&gt;</description></item><item><title>leetcode 15. 3Sum (k-sum问题，two pointer)</title><link>https://111qqz.com/en/post/acm-icpc/2017/2017-04-13-leetcode-15-3sum/</link><pubDate>Thu, 13 Apr 2017 08:21:52 +0000</pubDate><guid>https://111qqz.com/en/post/acm-icpc/2017/2017-04-13-leetcode-15-3sum/</guid><description>&lt;p&gt;Given an array &lt;em&gt;S&lt;/em&gt; of &lt;em&gt;n&lt;/em&gt; integers, are there elements &lt;em&gt;a&lt;/em&gt;, &lt;em&gt;b&lt;/em&gt;, &lt;em&gt;c&lt;/em&gt; in &lt;em&gt;S&lt;/em&gt; such that &lt;em&gt;a&lt;/em&gt; + &lt;em&gt;b&lt;/em&gt; + &lt;em&gt;c&lt;/em&gt; = 0? Find all unique triplets in the array which gives the sum of zero.&lt;/p&gt;</description></item></channel></rss>